Skip to content

Commit cc021ca

Browse files
committed
DOCSP-30350 final edits
1 parent 2b7584f commit cc021ca

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

source/crud/bulk.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -628,16 +628,20 @@ unordered.
628628
Troubleshooting
629629
---------------
630630

631+
Bulk Write Exception
632+
~~~~~~~~~~~~~~~~~~~~
633+
631634
If the driver encounters an error during a bulk write operation, the driver
632635
throws a `MongoBulkWriteException.
633636
<{+core-api+}/MongoBulkWriteException.html>`__ A ``MongoBulkWriteException``
634637
contains a ``writeErrors`` field consisting of a list of one or more
635638
``WriteError`` objects associated with the same bulk write operation.
636639

637640
Consider a collection that has a rule where the value of the ``quantity`` field
638-
must be an ``int`` type. In the following example, a ``MongoBulkWriteException``
639-
is thrown when when you attempt to insert a document with a ``quantity`` field
640-
value of ``"three"`` and another with a ``quantity`` field value of ``"ten"``.
641+
must be an ``int`` type. In the following example, the driver throws a
642+
``MongoBulkWriteException`` when you attempt to insert a document with a
643+
``quantity`` field value of ``"three"`` and another with a ``quantity`` field
644+
value of ``"ten"``.
641645

642646
.. code-block:: none
643647
:copyable: false
@@ -664,9 +668,6 @@ value of ``"three"`` and another with a ``quantity`` field value of ``"ten"``.
664668
com.mongodb.internal.connection.ProtocolHelper.getBulkWriteException(ProtocolHelper.java:254)
665669
... 19 more
666670

667-
To learn more about the ``MongoBulkWriteException`` and ``WriteError`` types,
668-
see MongoBulkWriteException and WriteError in the API Documentation section.
669-
670671
Additional Information
671672
----------------------
672673

source/crud/insert.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,18 @@ operation and an insert many operation:
194194
Troubleshooting
195195
---------------
196196

197+
Write Exception
198+
~~~~~~~~~~~~~~~
199+
197200
The driver throws a `MongoWriteException
198201
<{+core-api+}/MongoWriteException.html>`__ for any write errors that occur when
199202
performing single write operations. A ``MongoWriteException`` object has an
200203
``error`` field containing the ``WriteError`` object that caused it.
201204

202205
Consider a collection with a rule where the value of the ``quantity`` field must
203-
be an ``int`` type. In the following example, a ``MongoBulkWriteException`` is
204-
thrown if you attempt to insert a document where the value of ``quantity`` is
205-
``"three"``.
206+
be an ``int`` type. In the following example, the driver throws a
207+
``MongoWriteException`` if you attempt to insert a document where the value of
208+
``quantity`` is ``"three"``.
206209

207210
.. code-block:: none
208211
:copyable: false
@@ -217,9 +220,8 @@ thrown if you attempt to insert a document where the value of ``quantity`` is
217220
offendingDocument: {"name":"Apple","quantity":"three"} } } at
218221
com.mongodb.internal.connection.WriteResultHelper.createWriteException(WriteResultHelper.java:50)
219222

220-
To learn more about the ``MongoWriteException`` and ``WriteError`` types,
221-
see MongoWriteException and WriteError in the API Documentation section. To learn
222-
more about schema validation, see Schema Validation in the Server Manual Entries section.
223+
To learn more about schema validation, see Schema Validation in the Server
224+
Manual Entries section.
223225

224226
Additional Information
225227
----------------------

0 commit comments

Comments
 (0)