Module :: error_tools
Basic exceptions handling mechanism.
Basic use-case.
To add to your project
Try out from the repository
Basic exceptions handling mechanism.
fn main()
{
let err = f1();
println!( "{err:#?}" );
// < Err(
// < BasicError {
// < msg: "Some error",
// < },
// < )
}
fn f1() -> error_tools::Result< () >
{
let _read = std::fs::read_to_string( "Cargo.toml" )?;
Err( error_tools::BasicError::new( "Some error" ).into() )
}
cargo add error_tools
git clone https://github.com/Wandalen/wTools
cd wTools
cargo run --example error_tools_trivial