Catch errors from wasm / button handlers #2316
Unanswered
markkimsal
asked this question in
Q&A
Replies: 1 comment 1 reply
-
WASM doesn't support recovering from panics in rust, but you can get errors to show up in the console with the console_error_panic_hook crate. If you have the default features enabled on dioxus web with the default config, we automatically insert the handler here. Here is the error message with the default features: The first error message points to the right location |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you take the included counter example, change all the counters from i32 to u32, when you try to go "down low" from 0 then the counter simply stops working. There are no errors in the console.
If you do the overflow math inside the the code, you can see an error, but not when it's in an onclick handler. I think the error comes from the import handler in js.
Beta Was this translation helpful? Give feedback.
All reactions