]>
git.proxmox.com Git - rustc.git/blob - vendor/error-chain/src/bin/has_backtrace.rs
1 //! Exits with exit code 0 if backtraces are disabled and 1 if they are enabled.
2 //! Used by tests to make sure backtraces are available when they should be. Should not be used
3 //! outside of the tests.
6 extern crate error_chain
;
15 let err
= Error
::from(ErrorKind
::MyError
);
16 let has_backtrace
= err
.backtrace().is_some();
17 ::std
::process
::exit(has_backtrace
as i32);