fnerror
A Rust library for error handling when you want your functions to automatically generate errors.
Features
- Define error types directly in function expressions.
- Generate error types binding to the function.
Usage
Add the following to your Cargo.toml:
You also need to add thiserror to your crate: (Will be unneeded in the future)
Example
Which expands to (with thiserror feature):
Status
- Parse AST to generate error types.
- Generate error implementations using thiserror crate.
- Support generic error types (experimental).
- Support custom error name.
- Replace panics with errors.
- Support other error implementations.
- Support more formatting options.