@@ -68,15 +68,15 @@ internal protocol BSONValue: Codable {
6868 * - Throws:
6969 * - `InternalError` if the `DocumentStorage` would exceed the maximum size by encoding this
7070 * key-value pair.
71- * - `LogicError` if the value is an `Array` and it contains a non-`BSONValue` element.
71+ * - `MongoError. LogicError` if the value is an `Array` and it contains a non-`BSONValue` element.
7272 */
7373 func encode( to document: inout BSONDocument , forKey key: String ) throws
7474
7575 /**
7676 * Given a `BSONDocumentIterator` known to have a next value of this type,
7777 * initializes the value.
7878 *
79- * - Throws: `LogicError` if the current type of the `BSONDocumentIterator` does not correspond to the
79+ * - Throws: `MongoError. LogicError` if the current type of the `BSONDocumentIterator` does not correspond to the
8080 * associated type of this `BSONValue`.
8181 */
8282 static func from( iterator iter: BSONDocumentIterator ) throws -> BSON
@@ -221,7 +221,7 @@ public struct BSONBinary: BSONValue, Equatable, Codable, Hashable {
221221
222222 /// Initializes a `BSONBinary` instance from a `UUID`.
223223 /// - Throws:
224- /// - `InvalidArgumentError` if a `BSONBinary` cannot be constructed from this UUID.
224+ /// - `MongoError. InvalidArgumentError` if a `BSONBinary` cannot be constructed from this UUID.
225225 public init ( from uuid: UUID ) throws {
226226 let uuidt = uuid. uuid
227227
@@ -237,7 +237,7 @@ public struct BSONBinary: BSONValue, Equatable, Codable, Hashable {
237237
238238 /// Initializes a `BSONBinary` instance from a `Data` object and a `UInt8` subtype.
239239 /// - Throws:
240- /// - `InvalidArgumentError` if the provided data is incompatible with the specified subtype.
240+ /// - `MongoError. InvalidArgumentError` if the provided data is incompatible with the specified subtype.
241241 public init ( data: Data , subtype: UInt8 ) throws {
242242 if [ Subtype . uuid. rawValue, Subtype . uuidDeprecated. rawValue] . contains ( subtype) && data. count != 16 {
243243 throw MongoError . InvalidArgumentError (
@@ -251,14 +251,14 @@ public struct BSONBinary: BSONValue, Equatable, Codable, Hashable {
251251
252252 /// Initializes a `BSONBinary` instance from a `Data` object and a `Subtype`.
253253 /// - Throws:
254- /// - `InvalidArgumentError` if the provided data is incompatible with the specified subtype.
254+ /// - `MongoError. InvalidArgumentError` if the provided data is incompatible with the specified subtype.
255255 public init ( data: Data , subtype: Subtype ) throws {
256256 try self . init ( data: data, subtype: subtype. rawValue)
257257 }
258258
259259 /// Initializes a `BSONBinary` instance from a base64 `String` and a `UInt8` subtype.
260260 /// - Throws:
261- /// - `InvalidArgumentError` if the base64 `String` is invalid or if the provided data is
261+ /// - `MongoError. InvalidArgumentError` if the base64 `String` is invalid or if the provided data is
262262 /// incompatible with the specified subtype.
263263 public init ( base64: String , subtype: UInt8 ) throws {
264264 guard let dataObj = Data ( base64Encoded: base64) else {
@@ -272,7 +272,7 @@ public struct BSONBinary: BSONValue, Equatable, Codable, Hashable {
272272
273273 /// Initializes a `BSONBinary` instance from a base64 `String` and a `Subtype`.
274274 /// - Throws:
275- /// - `InvalidArgumentError` if the base64 `String` is invalid or if the provided data is
275+ /// - `MongoError. InvalidArgumentError` if the base64 `String` is invalid or if the provided data is
276276 /// incompatible with the specified subtype.
277277 public init ( base64: String , subtype: Subtype ) throws {
278278 try self . init ( base64: base64, subtype: subtype. rawValue)
@@ -324,7 +324,7 @@ public struct BSONBinary: BSONValue, Equatable, Codable, Hashable {
324324
325325 /// Converts this `BSONBinary` instance to a `UUID`.
326326 /// - Throws:
327- /// - `InvalidArgumentError` if a non-UUID subtype is set on this `BSONBinary`.
327+ /// - `MongoError. InvalidArgumentError` if a non-UUID subtype is set on this `BSONBinary`.
328328 public func toUUID( ) throws -> UUID {
329329 guard [ Subtype . uuid. rawValue, Subtype . uuidDeprecated. rawValue] . contains ( self . subtype) else {
330330 throw MongoError . InvalidArgumentError (
@@ -520,7 +520,7 @@ public struct BSONDecimal128: BSONValue, Equatable, Codable, CustomStringConvert
520520 /// Returns the provided string as a `bson_decimal128_t`, or throws an error if initialization fails due an
521521 /// invalid string.
522522 /// - Throws:
523- /// - `InvalidArgumentError` if the parameter string does not correspond to a valid `BSONDecimal128`.
523+ /// - `MongoError. InvalidArgumentError` if the parameter string does not correspond to a valid `BSONDecimal128`.
524524 internal static func toLibBSONType( _ str: String ) throws -> bson_decimal128_t {
525525 var value = bson_decimal128_t ( )
526526 guard bson_decimal128_from_string ( str, & value) else {
0 commit comments