Crates.io | werror |
lib.rs | werror |
version | 0.4.0 |
source | src |
created_at | 2021-12-04 20:23:21.799025 |
updated_at | 2023-10-29 08:20:42.27115 |
description | Basic exceptions handling mechanism. |
homepage | https://github.com/Wandalen/wTools/tree/master/module/alias/werror |
repository | https://github.com/Wandalen/wTools/tree/master/module/alias/werror |
max_upload_size | |
id | 492363 |
size | 19,790 |
Basic exceptions handling mechanism.
fn main()
{
let err = f1();
println!( "{err:#?}" );
// < Err(
// < BasicError {
// < msg: "Some error",
// < },
// < )
}
fn f1() -> werror::Result< () >
{
let _read = std::fs::read_to_string( "Cargo.toml" )?;
Err( werror::BasicError::new( "Some error" ).into() )
}
cargo add werror
git clone https://github.com/Wandalen/wTools
cd wTools
cargo run --example werror_tools_trivial