Comment on page
Codenic Exception Converter

The Codenic Exception Converter package provides a utility tool for converting
Exception
into Failure
objects.By converting exceptions into failure objects, the program can handle exceptions in a more generic way, rather than being tied to the specific details of a particular technology or framework. This can make it easier to write code that is more portable and easier to maintain, as it is not tied to the specifics of any particular technology.
This package has a built-in integration with the Codenic Logger, which allows it to generate log outputs as needed.
In addition, this uses fpdart's
Either
monad for managing union types.This tool includes the following classes for conveniently converting
Exceptions
into Failures
:Class | Description |
---|---|
The base class of all Failure objects. | |
A task observer class for converting a particular Exception into a Failure (must be paired with an Exception Converter Suite). | |
A task observer with a collection of Exception Converters for converting any Exceptions into their respective Failures . |
Add the Dart package in your
pubspec.yaml
by running the following command in the root of your project:dart pub add codenic_exception_converter
Install the package by calling:
dart pub get
Last modified 11mo ago