DEV Community

Discussion on: Error handling - Returning Results

Collapse
 
florianschaetz profile image
(((Florian Schätz)))

I do not believe this is better than exceptions. It forces every method to check for failure for all the methods it calls. Simple methods become huge constructs with lots of "if"s, because suddenly you have to check for all possible failures directly when calling a method instead of catching the ones you can do something about and give the other further outside automatically, completely ignoring them.

Collapse
 
mrlarson2007 profile image
Michael Larson

I agree with this, I have seen the dark side of avoid all exceptions, and it becomes a real mess and you have error checking code all over the place. I actual prefer exceptions for the reasons you mention in C#.