mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #1051] A way to catch errors? #762
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#762
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jcardonne on GitHub (Nov 5, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/1051
I'm working on a large and complex project, I'm looking for a way to close the app before a panic/crash in order to print the stack traces.
For the moment, the errors can't be displayed properly when there is a crash due to tview display.
@rivo commented on GitHub (Nov 5, 2024):
If your application panics in the main goroutine, it will reset the console before printing the stack trace. But if it panics in some random goroutine, this cannot be detected and the terminal will not be ready to print a proper stack trace. You'll have to catch those yourself and either promote them to the main goroutine or call
Application.Stop()before printing the stack trace.