We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a4d40e commit cffc188Copy full SHA for cffc188
src/wasm.rs
@@ -62,17 +62,16 @@ fn console_error(s: &str) {
62
63
#[panic_handler]
64
fn panic(panic_info: &core::panic::PanicInfo<'_>) -> ! {
65
- if let Some(message) = panic_info.message() {
66
- if let Some(location) = panic_info.location() {
67
- console_error(&format!(
68
- "panic: {message} ({}:{}:{})",
69
- location.file(),
70
- location.line(),
71
- location.column()
72
- ));
73
- } else {
74
- console_error(&format!("panic: {message:?}"));
75
- }
+ if let Some(location) = panic_info.location() {
+ console_error(&format!(
+ "panic: {} ({}:{}:{})",
+ panic_info.message(),
+ location.file(),
+ location.line(),
+ location.column()
+ ));
+ } else {
+ console_error(&format!("panic: {:?}", panic_info.message()));
76
}
77
core::arch::wasm32::unreachable()
78
0 commit comments