Skip to content

Commit

Permalink
std backtrace
Browse files Browse the repository at this point in the history
  • Loading branch information
fzyzcjy committed Jan 13, 2024
1 parent 28edef6 commit 372a5b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/into_dart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ impl IntoDart for anyhow::Error {
}
}

impl IntoDart for std::backtrace::Backtrace {
fn into_dart(self) -> DartCObject {
format!("{:?}", self).into_dart()
}
}

#[cfg(feature = "backtrace")]
impl IntoDart for backtrace::Backtrace {
fn into_dart(self) -> DartCObject {
Expand Down
1 change: 1 addition & 0 deletions tests/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ fn main() {

#[cfg(feature = "anyhow")]
assert!(isolate.post(return_anyhow_error()));
assert!(isolate.post(std::backtrace::Backtrace::capture()));
#[cfg(feature = "backtrace")]
assert!(isolate.post(return_backtrace()));
#[cfg(feature = "chrono")]
Expand Down

0 comments on commit 372a5b3

Please sign in to comment.