Skip to content

feat: add panic hook that asks users to report bugs#153

Merged
andrius-puksta-sensmetry merged 1 commit intomainfrom
ap/panic-hook
Jan 14, 2026
Merged

feat: add panic hook that asks users to report bugs#153
andrius-puksta-sensmetry merged 1 commit intomainfrom
ap/panic-hook

Conversation

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator

@andrius-puksta-sensmetry andrius-puksta-sensmetry commented Jan 6, 2026

Example panic output:

Sysand crashed. This is a bug. We would appreciate a bug report at either
Sysand's issue tracker: https://github.com/sensmetry/sysand/issues
or Sensmetry forum: https://forum.sensmetry.com/c/sysand/24
or via email: sysand@sensmetry.com

Below are details of the crash. It would be helpful to include them in the bug report.

thread 'main' (33563587) panicked at sysand/src/main.rs:14:5:
explicit panic
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It would be nice to always print a short backtrace, but the API for this in std is unstable and env::set_var() is unsafe, so currently this is not done.

Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Copy link
Copy Markdown
Collaborator

@victor-linroth-sensmetry victor-linroth-sensmetry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I had been thinking about doing something about the panic dumps for the not so technical users, and this works nicely.

@andrius-puksta-sensmetry andrius-puksta-sensmetry merged commit ce40848 into main Jan 14, 2026
51 checks passed
@andrius-puksta-sensmetry andrius-puksta-sensmetry deleted the ap/panic-hook branch January 14, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants