Saturday, June 30, 2018

Errors, Exceptions, and Faults, Oh My!

If we could code for the happy path only, I think that our lives would have been much nicer. Errors are hard because you keep having to deal with them, and even basic issues in error handling can take down systems that are composed of thousands of nodes.

I went out to look at research around error handling rates, and I found this paper. It says that about 3% of code (C#, mind) is error handling. However, it counts only the code inside catch/finally as error handling. My recent foray into C allowed me another data point. The short version with no memory handling is 30 lines of code. The long version with error handling is over a 100.



from DZone.com Feed https://ift.tt/2II1itM

No comments:

Post a Comment