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

fix: unwrap panic with more info #35

Merged
merged 1 commit into from
Jul 8, 2024
Merged

fix: unwrap panic with more info #35

merged 1 commit into from
Jul 8, 2024

Conversation

futurist
Copy link
Contributor

@futurist futurist commented Jul 8, 2024

fix: #34

The panic info will be printed as below:

thread 'tokio-runtime-worker' panicked at /Users/my/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-mitm-proxy-0.7.1/src/lib.rs:267:81:
connect uri: https://www2.bing.com:443/ipv6test/test: handshake failure
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

@hatoo
Copy link
Owner

hatoo commented Jul 8, 2024

Thank you!
I think those panics should be replaced by Result type but I'll happily merge this as a temporal fix.

@hatoo hatoo merged commit 8c64854 into hatoo:master Jul 8, 2024
1 check passed
@futurist
Copy link
Contributor Author

@hatoo Can you do some change from expect/unwrap to Result? The lib now not stable to use.

@hatoo
Copy link
Owner

hatoo commented Jul 11, 2024

@futurist how do you mean 'not stable'?
panics are handled by tokio runtime and doesn't cause an unexpected exit.

I'll do some work on saturday.

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.

show more context info when thread panicked
2 participants