ExceptionConverterSuite constructor

ExceptionConverterSuite({
  1. List<ExceptionConverterFactory> exceptionConverters = const [],
  2. CodenicLogger? logger,
})

An abstract class that converts an exception E to a Failure if exception E occurs while running observe .

If no error occurs, then value T is returned.

While a single ExceptionConverter may not be very useful on its own, you can use a group of exception converters together in an ExceptionConverterSuite to run a task and automatically convert any exceptions that are thrown into the appropriate Failure object.

Implementation

ExceptionConverterSuite({
  this.exceptionConverters = const [],
  CodenicLogger? logger,
}) : logger = logger ?? CodenicLogger() {
  _addPredefinedStackTraceBlocklist();
}