How to handle unexpected exceptions? Is there any type of error event? #3184
-
Hi, I want to know if there is a way to handle unexpected errors using the event system (the closest discussion I found is #2819). I want to catch any non-critical error without having exit the app. This way the end user doesn't see the app crashing but instead it can see (i.e.) a nice notification/toast like this:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There isn't, and I wouldn't generally recommend it. If an error is unhandled, your app could be a an unpredictable state. If you really want it, you could wrap your handlers in a try / except block. Or you could implement a decorator which catches exceptions and posts the notification. |
Beta Was this translation helpful? Give feedback.
There isn't, and I wouldn't generally recommend it. If an error is unhandled, your app could be a an unpredictable state.
If you really want it, you could wrap your handlers in a try / except block. Or you could implement a decorator which catches exceptions and posts the notification.