Skip to content

Commit ede2dcd

Browse files
committed
DOCSP-30350 toc tree update and editing
1 parent 51772d1 commit ede2dcd

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

source/crud.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CRUD Operations
1919
Collations </crud/collations>
2020
Large File Storage with GridFS </crud/gridfs>
2121
Configure Custom CRUD Settings </crud/crud-settings>
22+
Write Operation Error Handling </crud/operation-error-handling>
2223

2324
- :ref:`Insert Documents <java-fundamentals-insert>`
2425
- :ref:`Query Documents <java-read-operations>`

source/operation-error-handling.txt renamed to source/crud/operation-error-handling.txt

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,24 @@ returns an error of the `WriteError <{+core-api+}/WriteError.html>`__ type.
4242

4343
The ``WriteError`` type contains the following methods:
4444

45-
- `getCode <{+core-api+}/WriteError.html#getCode()>`__: returns the code associated with this error.
46-
- `getMessage <{+core-api+}/WriteError.html#getMessage()>`__: returns the message associated with this error.
47-
- `getDetails <{+core-api+}/WriteError.html#getDetails()>`__: returns a BSON Document with details associated with this
48-
error, which may be empty.
49-
- `getCategory <{+core-api+}/WriteError.html#getCategory()>`__: returns the category of the write error as an
50-
`ErrorCategory <{+core-api+}/ErrorCategory.html>`__ object.
45+
- ``getCode``: returns the code associated with this error
46+
- ``getMessage``: returns the message associated with this error
47+
- ``getDetails``: returns a BSON Document with details associated with this
48+
error, which may be empty
49+
- ``getCategory``: returns the category of the write error as an
50+
`ErrorCategory <{+core-api+}/ErrorCategory.html>`__ object
5151

5252
The `BulkWriteError <{+core-api+}/bulk/BulkWriteError.html>`__ type extends
53-
``WriteError`` and inherits the above methods. The `WriteConcernError
54-
<{+core-api+}/bulk/WriteConcernError.html>`__ is not related to the
55-
``WriteError`` type and details errors relating to the write concern.
53+
``WriteError`` and inherits the above methods. This type is used for bulk
54+
operations and includes an ``index`` field that identifies the item in the bulk
55+
operation that led to the error.
56+
57+
The `WriteConcernError <{+core-api+}/bulk/WriteConcernError.html>`__ is not
58+
related to the ``WriteError`` type and details errors relating to the write
59+
concern. In addition to the ``getCode``, ``getMessage``, and ``getDetails``
60+
methods, ``WriteConcernError`` has the ``getCodeName`` method, which returns the
61+
name associated with the error code. This type does not have the ``getCategory``
62+
method.
5663

5764
Write Error
5865
~~~~~~~~~~~

0 commit comments

Comments
 (0)