The MongoDB\Driver\WriteError class
(mongodb >=1.0.0)
Introduction
The MongoDB\Driver\WriteError class encapsulates information about a write error and may be returned as an array element from MongoDB\Driver\WriteResult::getWriteErrors().
Class synopsis
final
class MongoDB\Driver\WriteError
{
/* Properties */
/* Methods */
}Properties
messageThe error message.
codeThe error code.
indexThe index of the write operation within the MongoDB\Driver\BulkWrite that caused the error.
info
Additional information for the error, or null if not available.
Changelog
| Version | Description |
|---|---|
| PECL mongodb 2.3.0 | Added public readonly properties. |
Table of Contents
- MongoDB\Driver\WriteError::getCode — Returns the WriteError's error code
- MongoDB\Driver\WriteError::getIndex — Returns the index of the write operation corresponding to this WriteError
- MongoDB\Driver\WriteError::getInfo — Returns metadata document for the WriteError
- MongoDB\Driver\WriteError::getMessage — Returns the WriteError's error message
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
