Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Come up with a way to handle panics #324

@YaLTeR

Description

@YaLTeR

An example application that shows an error dialog with a backtrace and exits when a panic occurs within GUI code.

This is an issue I've been thinking about for some time and couldn't come up with an obvious solution for. It's unreasonable to forbid panics, but it's bad UX when the application inexplicably closes.

The problem is further complicated by the fact that the panic could occur in odd places such as GObject methods (constructed, etc.) and callbacks on another thread.

Since currently unwinding through C frames (GTK included) is undefined, an approach that comes to mind is to show a blocking dialog from within the panic hook and then abort once the dialog is closed. I'm not familiar enough with GTK to know if that can be done though. How do other languages handle critical errors in GTK applications?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions