Open seanchen1991 opened 3 years ago
Error
panic_error
core::panic
PanicInfo
&dyn Error + 'static
Box<dyn Any>
Box
dyn Error
dyn Any
unwrap
expect
panic!
Err
Questions to resolve:
Error
trait to core.panic_error
function tocore::panic
.PanicInfo
so that it can store a&dyn Error + 'static
instead of aBox<dyn Any>
(it might need to beBox
ed as well).dyn Error
instead ofdyn Any
if it is available, and to iterate over sources.unwrap
andexpect
to make them report errors viapanic_error
instead ofpanic!
when theErr
type implementsError
.Questions to resolve:
Error
trait need to be moved into core for this to work?Err
type interact with unwinding?Box
ing the&dyn Error + 'static
inPanicInfo
? Can the error be caught and handled as a payload? Do we wish to avoid this?