Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a user-friendly panic hook #1436

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Add a user-friendly panic hook #1436

merged 1 commit into from
Jan 30, 2023

Conversation

messense
Copy link
Member

@messense messense commented Jan 30, 2023

Replacement for human-panic that we removed in the past.

Adopted from Deno: https://github.com/denoland/deno/blob/266915d5ce354fde12b20f8f5ceb5ffdfacb7983/cli/main.rs#L181-L203

Example:

$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.21s
     Running `target/debug/maturin`

====================================================================
maturin has panicked. This is a bug in maturin. Please report this
at https://github.com/PyO3/maturin/issues/new/choose.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 environment
variable set and include the backtrace in your report.

Platform: macos aarch64
Version: 0.14.10
Args: target/debug/maturin

thread 'main' panicked at 'Test', src/main.rs:452:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@netlify
Copy link

netlify bot commented Jan 30, 2023

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit 82c4fb4
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/63d77eb6613fed0008c51481
😎 Deploy Preview https://deploy-preview-1436--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@messense messense merged commit 5dcfd70 into PyO3:main Jan 30, 2023
@messense messense deleted the panic-hook branch January 30, 2023 08:53
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.

1 participant