@@ -52,11 +52,17 @@ import kotlinx.serialization.modules.*
5252 * (`{` or `[`, depending on the descriptor kind), returning the [CompositeDecoder] that is aware of colon separator,
5353 * that should be read after each key-value pair, whilst [CompositeDecoder.endStructure] will parse a closing bracket.
5454 *
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,
5758 * [SerializationException] can be thrown by any decoder methods. It is recommended to declare a format-specific
5859 * subclass of [SerializationException] and throw it.
5960 *
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+ *
6066 * ### Format encapsulation
6167 *
6268 * For example, for the following deserializer:
@@ -79,11 +85,6 @@ import kotlinx.serialization.modules.*
7985 * }
8086 * ```
8187 *
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- *
8788 * This deserializer does not know anything about the underlying data and will work with any properly-implemented decoder.
8889 * JSON, for example, parses an opening bracket `{` during the `beginStructure` call, checks that the next key
8990 * after this bracket is `stringValue` (using the descriptor), returns the value after the colon as string value
0 commit comments