Crates.io | error_tools |
lib.rs | error_tools |
version | 0.15.0 |
source | src |
created_at | 2022-06-12 08:05:52.429108 |
updated_at | 2024-06-29 18:07:46.499948 |
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 | 47,277 |
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::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