Macro nes::err
[−]
[src]
macro_rules! err { ( $error:path ) => { ... }; ( $error:path, $( $arg:expr ),* ) => { ... }; }
This macro generates error that gets information, where the error has been occurred. You should return it.
# Example
let file_name=match args.next() { Some( file_name ) => file_name, None => return err!(CommonError::NoArguments), }; if !file_name.ends_with(".rs") { return err!(CommonError::IncorrectExtension, file_name, ".rs".to_string()) }