Comment on page

Codenic Exception Converter

What does it do?

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:
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.


1. Add the dependency

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

2. Build your app

Install the package by calling:
dart pub get

Next Steps

Once installed, view the Usage documentation to get started.