chatgpt-panic-hook
The last panic hook you will ever need.
When your Rust program panics, chatgpt-panic-hook preserves the normal panic output and opens
ChatGPT in your default browser with the panic message and source location:
Add it to your project:
cargo add chatgpt-panic-hook
That is the entire API. Calling install more than once has no additional effect.
From a repository checkout, run the example:
cargo run --example panic
The command intentionally panics and opens ChatGPT in the default browser.
Privacy
This crate sends panic messages and source paths to chatgpt.com as a URL query parameter. Those
values can contain secrets, private user data, or details about your machine. Use it for local
experiments, not production.
Origin
Inspired by the JavaScript error-handling strategy:
try catch
Rust does not have try/catch, but it does have panic hooks.
License
MIT