Crates.io | error_tools |
lib.rs | error_tools |
version | 0.19.0 |
source | src |
created_at | 2022-06-12 08:05:52.429108 |
updated_at | 2024-10-30 21:35:45.151618 |
description | Basic exceptions handling mechanism |
homepage | https://github.com/Wandalen/wTools/tree/master/module/core/error_tools |
repository | https://github.com/Wandalen/wTools/tree/master/module/core/error_tools |
max_upload_size | |
id | 604477 |
size | 32,157 |
Basic exceptions handling mechanism.
#[ cfg( feature = "enabled" ) ]
fn main()
{
let err = f1();
println!( "{err:#?}" );
// < Err(
// < BasicError {
// < msg: "Some error",
// < },
// < )
}
#[ cfg( feature = "enabled" ) ]
fn f1() -> error_tools::untyped::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