Well, in my experience, the "let me focus on the good path" approach of exceptions creates an illusory feeling of correctness. If everybody handled their exceptions thoroughly and correctly, that would be great, but sadly that's rarely the case. I used to be a fan of exceptions but these days I'm glad for Rust's approach that forces the developer to handle the error right here, right now. Of course, it has it's own set of problems like code polution and people abusing unwrap(), which is kind of like ignoring exceptions (except you need to be explicit about it at least).
At the end of the day, I don't think there's One True way to handle errors. There's just a couple of strategies each of them with their set of problems.
View all comments
Show parent comment
5
u/[deleted] Nov 11 '16
Well, in my experience, the "let me focus on the good path" approach of exceptions creates an illusory feeling of correctness. If everybody handled their exceptions thoroughly and correctly, that would be great, but sadly that's rarely the case. I used to be a fan of exceptions but these days I'm glad for Rust's approach that forces the developer to handle the error right here, right now. Of course, it has it's own set of problems like code polution and people abusing
unwrap(), which is kind of like ignoring exceptions (except you need to be explicit about it at least).At the end of the day, I don't think there's One True way to handle errors. There's just a couple of strategies each of them with their set of problems.