SerializationException class

An exception that is thrown when an error occurs during serialization or deserialization.

This exception provides detailed information about the error, including the payload that caused the error and a specific error code.

Inheritance
Annotations
  • @immutable

Constructors

SerializationException.new({required Object? exception, required StackTrace stackTrace, required Object? payload, required SerializationExceptionCode code})
const

Properties

code SerializationExceptionCode
The specific error code that describes the error.
final
exception Object?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
payload Object?
The data that was being processed when the error occurred.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace
finalinherited
userFriendlyMessage String
User-friendly message
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getValue<T>(Map<String, Object?> json, String key) → T
Safely retrieves a value of type T from a JSON map.