# ConverterNotFoundException constructor

ConverterNotFoundException({

1. Class? sourceType,
2. required Class targetType,

})

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),
    );

## Implementation

    ConverterNotFoundException({
      this.sourceType,
      required this.targetType,
    }) : super(
      'No converter found capable of converting from type '
      '[${sourceType ?? "unknown"}] to type [$targetType]',
    );