3 ms·
> IIUC, panicking via unwrap() or expect() IS graceful error handling. It unwinds the stack and releases resources. AFAIK, only with the default panic=unwind m
by cesarb 7y ago
> IIUC, panicking via unwrap() or expect() IS graceful error handling. It unwinds the stack and releases resources.
AFAIK, only with the default panic=unwind mode. With the panic=abort mode, it aborts the whole process instead of unwinding.
- jashmatthews 7y agopanic=abort is only intended for embedded stuff, I think.
- steveklabnik 7y agoNope, it's intended whenever you want this semantic, and do not want to pay for landing pads. Embedded is a common case where this is true, but it's not exclusively for that.