File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
crates/crates_io_worker/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use anyhow::anyhow;
22use sentry_core:: Hub ;
33use std:: any:: Any ;
44use std:: future:: Future ;
5- use std:: panic:: PanicInfo ;
5+ use std:: panic:: PanicHookInfo ;
66
77pub async fn with_sentry_transaction < F , R , E , Fut > (
88 transaction_name : & str ,
@@ -34,11 +34,11 @@ where
3434/// Try to figure out what's in the box, and print it if we can.
3535///
3636/// The actual error type we will get from `panic::catch_unwind` is really poorly documented.
37- /// However, the `panic::set_hook` functions deal with a `PanicInfo ` type, and its payload is
37+ /// However, the `panic::set_hook` functions deal with a `PanicHookInfo ` type, and its payload is
3838/// documented as "commonly but not always `&'static str` or `String`". So we can try all of those,
3939/// and give up if we didn't get one of those three types.
4040pub fn try_to_extract_panic_info ( info : & ( dyn Any + Send + ' static ) ) -> anyhow:: Error {
41- if let Some ( x) = info. downcast_ref :: < PanicInfo < ' _ > > ( ) {
41+ if let Some ( x) = info. downcast_ref :: < PanicHookInfo < ' _ > > ( ) {
4242 anyhow ! ( "job panicked: {x}" )
4343 } else if let Some ( x) = info. downcast_ref :: < & ' static str > ( ) {
4444 anyhow ! ( "job panicked: {x}" )
You can’t perform that action at this time.
0 commit comments