nes-0.1.1 doesn't have any documentation.
NES
New Error System is the library for rust, that makes the syntax more elegant for operating by errors.
Description
- It uses stable version of rust
- Each error stores the location in source code, where the error has been occurred, because some errors like std::io::Error may occurs in different places in code, it is useful for detection of problems.
- Where is collection of macros that make the syntax more elegant and short.
- You can use your own ErrorInfo, that stores information where an error has been occurred.
Information about error:
Display ({})
example/examples/example.rs 16:0 //line, where impl_from_error!() is.
read file error example/examples/example.rs 51:13 //line where thr error has been occurred
Can not read file "no_file.rs" : No such file or directory (os error 2) //description of error
Debug ({:?})
example/examples/example.rs 18:0
CommonError::ReadFileError read_file_error:example/examples/example.rs 53:13
ReadFileError::ReadFileError io_error:Error { repr: Os { code: 2, message: "No such file or directory" } } file:"no_file.rs"
If you have some ideas, write them in Issues.
Usage
Cargo.toml
= "*"
//See examples/example.rs
define_error!;
define_error!;
impl_from_error!;
!
!
License
MIT