Macro cmd_lib::cmd_die[][src]

cmd_die!() { /* proc-macro */ }

Report fatal errors and exit process conveniently

e.g:

let file = "bad_file";
cmd_die!("could not open file: $file");
// output:
// FATAL: could not open file: bad_file

format should be string literals, and variable interpolation is supported. Note that this macro is just for convenience. The process will exit with 1 and print “FATAL: …” messages to error console. If you want to exit with other code, you should probably define your own macro or functions.