Skip to content

Commit 57a248a

Browse files
committed
Add example error message and backtrace from node
1 parent ab2c867 commit 57a248a

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

with_panic_hook_node.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
panicked at 'Oh no!', src/lib.rs:34:5
2+
wasm://wasm/008bb5fe:306
3+
4+
^
5+
6+
RuntimeError: unreachable
7+
at __rust_start_panic (wasm-function[305]:1)
8+
at rust_panic (wasm-function[302]:30)
9+
at std::panicking::rust_panic_with_hook::h7272e611f0b79f9b (wasm-function[297]:444)
10+
at std::panicking::begin_panic::h320534c109c5fbc7 (wasm-function[10]:163)
11+
at console_error_panic_hook_test::panic::h488a1aaa03d46c86 (wasm-function[43]:37)
12+
at panic (wasm-function[44]:33)
13+
at Object.module.exports.panic (/Users/kyle/console-error-panic-hook-test/pkg/console_error_panic_hook_test.js:37:17)
14+
at Object.<anonymous> (/Users/kyle/console-error-panic-hook-test/pkg/test.js:3:5)
15+
at Module._compile (internal/modules/cjs/loader.js:702:30)
16+
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)

without_panic_hook_node.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
wasm://wasm/00863b9e:93
2+
3+
^
4+
5+
RuntimeError: unreachable
6+
at __rust_start_panic (wasm-function[92]:1)
7+
at rust_panic (wasm-function[91]:30)
8+
at std::panicking::rust_panic_with_hook::h7272e611f0b79f9b (wasm-function[88]:440)
9+
at std::panicking::begin_panic::h320534c109c5fbc7 (wasm-function[5]:163)
10+
at console_error_panic_hook_test::panic::h488a1aaa03d46c86 (wasm-function[34]:35)
11+
at panic (wasm-function[35]:33)
12+
at Object.module.exports.panic (/Users/kyle/console-error-panic-hook-test/pkg/console_error_panic_hook_test.js:37:17)
13+
at Object.<anonymous> (/Users/kyle/console-error-panic-hook-test/pkg/test.js:3:5)
14+
at Module._compile (internal/modules/cjs/loader.js:702:30)
15+
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)

0 commit comments

Comments
 (0)