MongoDB\Driver\WriteError::getMessageReturns the WriteError's error message Description
final public string MongoDB\Driver\WriteError::getMessage()
ParametersThis function has no parameters. Return ValuesReturns the WriteError's error message. Errors/Exceptions
ExamplesExample #1 MongoDB\Driver\WriteError::getMessage example
The above example will output something similar to: string(70) "E11000 duplicate key error index: db.collection.$_id_ dup key: { : 1 }" |