Class DecoderException
- Namespace
- ShapeShift
- Assembly
- ShapeShift.dll
The exception a decoder throws when its input is malformed.
public class DecoderException : Exception, ISerializable
- Inheritance
-
DecoderException
- Implements
- Inherited Members
Remarks
This is how a format reports "these bytes are not valid", as distinct from ShapeShiftSerializationException, which reports that a structurally valid document does not match the shape being deserialized and carries the ShapeShiftPath to the value that failed.
A decoder reads attacker-controlled bytes, so every rejection must arrive here. An IndexOutOfRangeException, ArgumentOutOfRangeException, NullReferenceException, or an unbounded allocation escaping a decoder means a missing length or bounds check rather than a merely inconvenient exception type.
Constructors
DecoderException(string)
Initializes a new instance of the DecoderException class.
public DecoderException(string message)
Parameters
messagestringThe message that describes the malformed input.
DecoderException(string, Exception?)
Initializes a new instance of the DecoderException class.
public DecoderException(string message, Exception? innerException)