madsim-rs / madsim

Magical Deterministic Simulator for distributed systems in Rust.
Apache License 2.0
622 stars 41 forks source link

feat: print context info on panic #134

Closed wangrunji0408 closed 1 year ago

wangrunji0408 commented 1 year ago

example:

---- basic stdout ----
thread '<unnamed>' panicked at 'explicit panic', tonic-example/tests/test.rs:43:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
context: node=1 "server", task=33 (spawned at tonic-example/tests/test.rs:42:11)