|
|
|
|
|
by throwawayninja
1563 days ago
|
|
Exceptions can be handled, so in rust an "exception" is a "Result<T,U>". A panic means the program terminates, guaranteed. This allows us to ignore hugely difficult edge cases when interacting with hardware / OSes and still ensure the code meets safety guarantees; if the code isn't executing it cannot invalidate any invariants. |
|
That's not strictly true: https://doc.rust-lang.org/std/panic/fn.catch_unwind.html