DEV Community


Discussion on: Error Handling in Rust programming language

aminmansuri profile image

You always care if its null. If something bad happens the calling function may need to abort. So the if statement is important to know if you have to abort or not.

Exceptions elegantly solve this problem. The Rust mechanism, since it doesn't interrupt execution, actually seems to make things more complex.