@@ -52,11 +52,17 @@ import kotlinx.serialization.modules.*
52
52
* (`{` or `[`, depending on the descriptor kind), returning the [CompositeDecoder] that is aware of colon separator,
53
53
* that should be read after each key-value pair, whilst [CompositeDecoder.endStructure] will parse a closing bracket.
54
54
*
55
- * ### Exception guarantees.
56
- * For the regular exceptions, such as invalid input, missing control symbols or attributes and unknown symbols,
55
+ * ### Exception guarantees
56
+ *
57
+ * For the regular exceptions, such as invalid input, missing control symbols or attributes, and unknown symbols,
57
58
* [SerializationException] can be thrown by any decoder methods. It is recommended to declare a format-specific
58
59
* subclass of [SerializationException] and throw it.
59
60
*
61
+ * ### Exception safety
62
+ *
63
+ * In general, catching [SerializationException] from any of `decode*` methods is not allowed and produces unspecified behavior.
64
+ * After thrown exception, the current decoder is left in an arbitrary state, no longer suitable for further decoding.
65
+ *
60
66
* ### Format encapsulation
61
67
*
62
68
* For example, for the following deserializer:
@@ -79,11 +85,6 @@ import kotlinx.serialization.modules.*
79
85
* }
80
86
* ```
81
87
*
82
- * ### Exception safety
83
- *
84
- * In general, catching [SerializationException] from any of `decode*` methods is not allowed and produces unspecified behaviour.
85
- * After thrown exception, current decoder is left in an arbitrary state, no longer suitable for further decoding.
86
- *
87
88
* This deserializer does not know anything about the underlying data and will work with any properly-implemented decoder.
88
89
* JSON, for example, parses an opening bracket `{` during the `beginStructure` call, checks that the next key
89
90
* after this bracket is `stringValue` (using the descriptor), returns the value after the colon as string value
0 commit comments