final class WriteError (View source)

The MongoDB\Driver\WriteError class encapsulates information about a write error and may be returned as an array element from MongoDB\Driver\WriteResult::getWriteErrors().

Methods

__wakeup()

No description

int
getCode()

Returns the WriteError's error code

int
getIndex()

Returns the index of the write operation corresponding to this WriteError

object|null
getInfo()

Returns additional metadata for the WriteError

string
getMessage()

Returns the WriteError's error message

Details

final __wakeup()

No description

final int getCode()

Returns the WriteError's error code

Return Value

int

final int getIndex()

Returns the index of the write operation corresponding to this WriteError

Return Value

int

final object|null getInfo()

Returns additional metadata for the WriteError

Return Value

object|null

final string getMessage()

Returns the WriteError's error message

Return Value

string