maraiah: add backtrace macro
parent
19cf86b8bc
commit
b16b2a7ff1
|
@ -32,6 +32,15 @@ macro_rules! bail {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! backtrace {
|
||||||
|
($e:expr) => {
|
||||||
|
if cfg!(debug_assertions) {
|
||||||
|
dbg!($e.backtrace());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns an `Error` with a static string.
|
/// Returns an `Error` with a static string.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
|
|
Loading…
Reference in New Issue