ConverterNotFoundException class

Exception thrown when no suitable converter can be found for a given source and target type.

This typically occurs when a user attempts to convert between two types that have no registered Converter or GenericConverter in the current ConversionService.


Example:

throw ConverterNotFoundException(
  sourceType: Class.of(DateTime),
  targetType: Class.of(Uri),
);
Inheritance
Implemented types

Constructors

ConverterNotFoundException({Class? sourceType, required Class targetType})
Exception thrown when no suitable converter can be found for a given source and target type.

Properties

cause Object?
The underlying cause of this exception, if any.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
message String
The message describing the error.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceType → Class?
The source type requested to convert from.
final
stackTrace StackTrace
The associated stack trace.
finalinherited
targetType → Class
The target type requested to convert to.
final

Methods

getCause() Object
The cause of this exception, if any.
inherited
getMessage() String
The message associated with this exception.
inherited
getStackTrace() StackTrace
The stack trace associated with this exception.
inherited
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