News for hackers. Stuff that matters.
Re:Errors and Exceptions by qznc on Friday August 21, 2015 @10:31AM (#10097689)
I like to say "Rust has exceptions, you just can't catch them". If you use panic!() in Rust, it will unwind the stack, just like exceptions do. Destructors correspond to finally blocks in Java.
Re:Errors and Exceptions by sanderjd on Friday August 21, 2015 @10:52AM (#10097868)
Also worth noting that "things come unglued" applies to panics in destructors in Rust the way it applies to exceptions in destructors in C++.