Skip to content

Commit

Permalink
drop! debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Jan 22, 2021
1 parent dea6238 commit 93576c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4608,9 +4608,18 @@ fn prepare_stack_trace_callback() {

for i in 0..3 {
let site = sites.get_index(scope, i).unwrap();
eprintln!("site: {}", site.to_rust_string_lossy(scope));
global.set(scope, name, site).unwrap();
let script = scripts[i as usize];
let result = eval(scope, script);
eprintln!(
"result: {}",
result
.or_else(|| scope.stack_trace())
.or_else(|| scope.exception())
.unwrap()
.to_rust_string_lossy(scope)
);
assert!(result.is_some());
}

Expand Down

0 comments on commit 93576c9

Please sign in to comment.