Skip to content

Commit 3ef9fb4

Browse files
authored
Merge pull request rustwasm#4 from migerh/add-screenshots-to-readme
Add screenshots to readme
2 parents dd95b4d + 3ac2675 commit 3ef9fb4

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ When an error is reported with `console.error`, browser devtools and node.js
1313
will typically capture a stack trace and display it with the logged error
1414
message.
1515

16+
Without `console_error_panic_hook` you just get something like *RuntimeError: Unreachable executed*
17+
18+
![Console without panic hook](without_panic_hook.png)
19+
20+
With this panic hook installed you will see the panic message
21+
22+
![Console with panic hook set up](with_panic_hook.png)
23+
1624
### Usage
1725

1826
There are two ways to install this panic hook.

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
//! will typically capture a stack trace and display it with the logged error
1414
//! message.
1515
//!
16+
//! Without `console_error_panic_hook` you just get something like *RuntimeError: Unreachable executed*
17+
//!
18+
//! ![Console without panic hook](without_panic_hook.png)
19+
//!
20+
//! With this panic hook installed you will see the panic message
21+
//!
22+
//! ![Console with panic hook set up](with_panic_hook.png)
23+
//!
1624
//! ## Usage
1725
//!
1826
//! There are two ways to install this panic hook.

with_panic_hook.png

78 KB
Loading

without_panic_hook.png

28.2 KB
Loading

0 commit comments

Comments
 (0)