Lines Matching refs:exception
7 All exceptions inherit from class `json::exception` (which in turn inherits from `std::exception`).…
10 std::exception <|-- json::exception
11 json::exception <|-- json::parse_error
12 json::exception <|-- json::invalid_iterator
13 json::exception <|-- json::type_error
14 json::exception <|-- json::out_of_range
15 json::exception <|-- json::other_error
17 interface std::exception {}
19 class json::exception {
43 #define JSON_CATCH_USER(exception) if(false)
44 #define JSON_THROW_USER(exception) \
47 << (exception).what() << std::endl; \
55 This exception is thrown by the library when a parse error occurs. Parse errors
72 The following code shows how a `parse_error` exception can be caught.
85 ### json.exception.parse_error.101
94 …[json.exception.parse_error.101] parse error at 2: unexpected end of input; expected string literal
100 …[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value…
106 …[json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value…
112 …[json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value…
118 …[json.exception.parse_error.101] parse error at line 1, column 3: syntax error while parsing value…
124 …[json.exception.parse_error.101] parse error at line 1, column 6: syntax error while parsing value…
130 …[json.exception.parse_error.101] parse error at line 1, column 13: syntax error while parsing valu…
136 …[json.exception.parse_error.101] parse error at line 3, column 24: syntax error while parsing valu…
144 ### json.exception.parse_error.102
154 ### json.exception.parse_error.103
164 ### json.exception.parse_error.104
171 [json.exception.parse_error.104] parse error: JSON patch must be an array of objects
174 ### json.exception.parse_error.105
181 [json.exception.parse_error.105] parse error: operation 'add' must have member 'value'
184 [json.exception.parse_error.105] parse error: operation 'copy' must have string member 'from'
187 [json.exception.parse_error.105] parse error: operation value 'foo' is invalid
190 ### json.exception.parse_error.106
197 [json.exception.parse_error.106] parse error: array index '01' must not begin with '0'
200 ### json.exception.parse_error.107
207 …[json.exception.parse_error.107] parse error at byte 1: JSON pointer must be empty or begin with '…
210 ### json.exception.parse_error.108
217 …[json.exception.parse_error.108] parse error: escape character '~' must be followed with '0' or '1'
220 ### json.exception.parse_error.109
227 [json.exception.parse_error.109] parse error: array index 'one' is not a number
230 [json.exception.parse_error.109] parse error: array index '+1' is not a number
233 ### json.exception.parse_error.110
240 …[json.exception.parse_error.110] parse error at byte 5: syntax error while parsing CBOR string: un…
243 …[json.exception.parse_error.110] parse error at byte 2: syntax error while parsing UBJSON value: e…
246 ### json.exception.parse_error.112
248 Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte wa…
253 …[json.exception.parse_error.112] parse error at byte 1: syntax error while parsing CBOR value: inv…
256 ### json.exception.parse_error.113
263 …[json.exception.parse_error.113] parse error at byte 2: syntax error while parsing CBOR string: ex…
266 …[json.exception.parse_error.113] parse error at byte 2: syntax error while parsing MessagePack str…
269 …[json.exception.parse_error.113] parse error at byte 2: syntax error while parsing UBJSON char: by…
272 ### json.exception.parse_error.114
279 [json.exception.parse_error.114] parse error at byte 5: Unsupported BSON record type 0xFF
282 ### json.exception.parse_error.115
289 …[json.exception.parse_error.115] parse error at byte 5: syntax error while parsing UBJSON high-pre…
294 This exception is thrown if iterators passed to a library function do not match
301 The following code shows how an `invalid_iterator` exception can be caught.
313 ### json.exception.invalid_iterator.201
320 [json.exception.invalid_iterator.201] iterators are not compatible
323 ### json.exception.invalid_iterator.202
330 [json.exception.invalid_iterator.202] iterator does not fit current value
333 [json.exception.invalid_iterator.202] iterators first and last must point to objects
336 ### json.exception.invalid_iterator.203
343 [json.exception.invalid_iterator.203] iterators do not fit current value
346 ### json.exception.invalid_iterator.204
353 [json.exception.invalid_iterator.204] iterators out of range
356 ### json.exception.invalid_iterator.205
363 [json.exception.invalid_iterator.205] iterator out of range
366 ### json.exception.invalid_iterator.206
373 [json.exception.invalid_iterator.206] cannot construct with iterators from null
376 ### json.exception.invalid_iterator.207
383 [json.exception.invalid_iterator.207] cannot use key() for non-object iterators
387 ### json.exception.invalid_iterator.208
394 [json.exception.invalid_iterator.208] cannot use operator[] for object iterators
397 ### json.exception.invalid_iterator.209
404 [json.exception.invalid_iterator.209] cannot use offsets with object iterators
407 ### json.exception.invalid_iterator.210
414 [json.exception.invalid_iterator.210] iterators do not fit
417 ### json.exception.invalid_iterator.211
424 [json.exception.invalid_iterator.211] passed iterators may not belong to container
427 ### json.exception.invalid_iterator.212
434 [json.exception.invalid_iterator.212] cannot compare iterators of different containers
437 ### json.exception.invalid_iterator.213
444 [json.exception.invalid_iterator.213] cannot compare order of object iterators
447 ### json.exception.invalid_iterator.214
454 [json.exception.invalid_iterator.214] cannot get value
460 This exception is thrown in case of a type error; that is, a library function is executed on a JSON…
466 The following code shows how a `type_error` exception can be caught.
478 ### json.exception.type_error.301
485 [json.exception.type_error.301] cannot create object from initializer list
488 ### json.exception.type_error.302
495 [json.exception.type_error.302] type must be object, but is null
498 [json.exception.type_error.302] type must be string, but is object
501 ### json.exception.type_error.303
508 [json.exception.type_error.303] incompatible ReferenceType for get_ref, actual type is object
511 [json.exception.type_error.303] incompatible ReferenceType for get_ref, actual type is number"
514 ### json.exception.type_error.304
521 [json.exception.type_error.304] cannot use at() with string
524 [json.exception.type_error.304] cannot use at() with number
527 ### json.exception.type_error.305
534 [json.exception.type_error.305] cannot use operator[] with a string argument with array
537 [json.exception.type_error.305] cannot use operator[] with a numeric argument with object
540 ### json.exception.type_error.306
547 [json.exception.type_error.306] cannot use value() with number
550 ### json.exception.type_error.307
557 [json.exception.type_error.307] cannot use erase() with string
560 ### json.exception.type_error.308
567 [json.exception.type_error.308] cannot use push_back() with string
570 ### json.exception.type_error.309
577 [json.exception.type_error.309] cannot use insert() with array
580 [json.exception.type_error.309] cannot use insert() with number
583 ### json.exception.type_error.310
590 [json.exception.type_error.310] cannot use swap() with number
593 ### json.exception.type_error.311
600 [json.exception.type_error.311] cannot use emplace() with number
603 [json.exception.type_error.311] cannot use emplace_back() with number
606 ### json.exception.type_error.312
613 [json.exception.type_error.312] cannot use update() with array
616 ### json.exception.type_error.313
623 [json.exception.type_error.313] invalid value to unflatten
626 ### json.exception.type_error.314
635 [json.exception.type_error.314] only objects can be unflattened
638 ### json.exception.type_error.315
647 [json.exception.type_error.315] values in object must be primitive
650 ### json.exception.type_error.316
658 [json.exception.type_error.316] invalid UTF-8 byte at index 15: 0x6F
664 - Pass an error handler as last parameter to the `dump()` function to avoid this exception:
668 ### json.exception.type_error.317
676 [json.exception.type_error.317] to serialize to BSON, top-level type must be object, but is null
680 … [json.exception.type_error.317] to serialize to BSON, top-level type must be object, but is array
690 This exception is thrown in case a library function is called on an input parameter that exceeds th…
696 The following code shows how an `out_of_range` exception can be caught.
708 ### json.exception.out_of_range.401
718 ### json.exception.out_of_range.402
728 ### json.exception.out_of_range.403
738 ### json.exception.out_of_range.404
748 ### json.exception.out_of_range.405
758 ### json.exception.out_of_range.406
768 ### json.exception.out_of_range.407
780 … beyond int64 are serialized as high-precision UBJSON numbers, and this exception does not further…
782 ### json.exception.out_of_range.408
792 ### json.exception.out_of_range.409
804 This exception is thrown in case of errors that cannot be classified with the
805 other exception types.
811 The following code shows how an `other_error` exception can be caught.
823 ### json.exception.other_error.501
832 [json.exception.other_error.501] unsuccessful: {"op":"test","path":"/baz","value":"bar"}