explain why we use resume_unwind
This commit is contained in:
parent
f72c031eb9
commit
86bc898a2f
1 changed files with 2 additions and 0 deletions
|
|
@ -29,6 +29,8 @@ impl Canceled {
|
|||
}
|
||||
|
||||
pub fn throw() -> ! {
|
||||
// We use resume and not panic here to avoid running the panic
|
||||
// hook (that is, to avoid collecting and printing backtrace).
|
||||
std::panic::resume_unwind(Box::new(Canceled::new()))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue