Dutch PHP Conference 2025 - Call For Papers

MongoDB\Driver\Exception\RuntimeException::hasErrorLabel

(mongodb >= 1.6.0)

MongoDB\Driver\Exception\RuntimeException::hasErrorLabelReturns whether an error label is associated with an exception

Опис

final public 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.

Прогляньте також

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top