« MongoDB\Driver\Exception\RuntimeException
MongoDB\Driver\Exception\ServerException »

MongoDB\Driver\Exception\RuntimeException::hasErrorLabel

(mongodb >= 1.6.0)

MongoDB\Driver\Exception\RuntimeException::hasErrorLabel — Returns whether an error label is associated with an exception

説明

final public function MongoDB\Driver\Exception\RuntimeException::hasErrorLabel(string $errorLabel): bool

Returns whether the errorLabel has been set for this exception. Error labels are set by either the server or the extension to indicate specific situations that may be handled by an application. A common situation might be determining whether to safely retry a transaction that failed due to a transient error (e.g. network error, transaction conflict). Examples of error labels are TransientTransactionError and UnknownTransactionCommitResult.

パラメータ

errorLabel

The name of the errorLabel to test for.

戻り値

Whether the given errorLabel is associated with this exception.

関連キーワード:
MongoDB   Driver   Exception   whether   exception   RuntimeException   errorLabel   associated   label   hasErrorLabel   transaction   labels   ServerException   mongodb   final   server   extension   indicate   specific   situations   handled   application   common   situation   determining
関連する関数・ページ:
class.mongodb-driver-exception-runtimeexception   class.mongodb-driver-exception-serverexception   mongodb-driver-session.committransaction   mongodb.exceptions   mongodb.exceptions.tree   class.mongodb-driver-exception-executiontimeoutexception