BulkWriteCommandException
final class BulkWriteCommandException extends ServerException (View source)
Exception thrown due to failed execution of a MongoDB\Driver\BulkWriteCommand.
The methods of this class provide more details of the error that occurred, including the error reply and partial results from the bulk write.
Properties
protected | $message | The error message |
from Exception |
protected | $code | The error code |
from Exception |
protected | $file | The filename where the error happened |
from Exception |
protected | $line | The line where the error happened |
from Exception |
protected bool
Since: 1.6.0
|
$errorLabels | from RuntimeException |
Methods
Construct the exception. Note: The message is NOT binary safe.
Whether the given errorLabel is associated with this exception
Returns any top-level command error
Returns the result of any successful write operations
Returns any write errors
Returns any write concern errors
Details
__construct(string $message = "", int $code = 0, null|Throwable $previous = null)
Construct the exception. Note: The message is NOT binary safe.
final string
getMessage()
Gets the Exception message
final int
getCode()
Gets the Exception code
final string
getFile()
Gets the file in which the exception occurred
final int
getLine()
Gets the line in which the exception occurred
final array
getTrace()
Gets the stack trace
final null|Throwable
getPrevious()
Returns previous Exception
final string
getTraceAsString()
Gets the stack trace as a string
string
__toString()
String representation of the exception
void
__wakeup()
No description
final bool
hasErrorLabel(string $label)
Whether the given errorLabel is associated with this exception
final Document|null
getErrorReply()
Returns any top-level command error
final BulkWriteCommandResult|null
getPartialResult()
Returns the result of any successful write operations
final array
getWriteErrors()
Returns any write errors
final array
getWriteConcernErrors()
Returns any write concern errors