Recover from panics in RunApplication() #2

Closed
opened 2024-05-21 19:41:33 -06:00 by sashakoshka · 1 comment
Owner

Nasin depends on objects. It would be cool to, instead of crash to stderr or whatever go normally does, throw up an error dialog explaining the error when something panics within RunApplication. This would indicate to the user that something has gone wrong with the application instead of just abruptly closing it. When the user presses OK to close the application, we can re-panic to still have the normal behavior.

Nasin depends on objects. It would be cool to, instead of crash to stderr or whatever go normally does, throw up an error dialog explaining the error when something panics within RunApplication. This would indicate to the user that something has gone wrong with the application instead of just abruptly closing it. When the user presses OK to close the application, we can re-panic to still have the normal behavior.
Author
Owner

On second thought, this would not work at all.

Because application code is either run in callbacks (executed in the backend's event loop), or in a separate goroutine, nasin would have to re-initialize the backend to recover from the application panic (when the panic can even be recovered from).

If there is ever a desktop environment built with Tomo, this feature could be implemented as a wrapper program that watches for program crashes and stack traces and displays them to the user once they happen.

On second thought, this would not work at all. Because application code is either run in callbacks (executed in the backend's event loop), or in a separate goroutine, nasin would have to re-initialize the backend to recover from the application panic (when the panic can even be recovered from). If there is ever a desktop environment built with Tomo, this feature could be implemented as a wrapper program that watches for program crashes and stack traces and displays them to the user once they happen.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tomo/nasin#2
No description provided.