From the Blogosphere
Software Error vs Exception – In Real World Examples | @DevOpsSummit #DevOps #APM #Monitoring
As a developer, part of our challenge is trying to anticipate all the problems that could happen
By: Stackify Blog
Apr. 19, 2017 02:00 PM
Software Error vs Exception - In Real World Examples
After 15+ years of software development, I still use the words error and exception interchangeably.
But is there a difference between exceptions and errors?
I think it is best to make the distinction with some examples of errors vs exceptions.
Example #1: Dishwasher Errors
I think this dishwasher example perfectly sums up the difference between an error and an exception. Both of these problems were errors. The difference here is the designer and engineers designed the product to handle one of the errors. It was an exception that the engineering team knew how to detect and handle. The engineering team did not detect or handle the soap problem.
Example #2: Software Avoiding a Car Crash
Example #3: ATM
If the developers didn't handle this correctly, they could be handing out money to people who shouldn't be receiving it.
Or what if the ATM itself didn't have any money? It would not be good if they deducted $100 from your account for the money you were withdrawing, but it didn't actually give you any.
How to Anticipate Application Errors
If you don't handle possible error scenarios, inevitably, they will happen and your users will have problems. Granted, some of them might be user errors and there may not be anything you can do about them. The dishwasher soap example is a good example of this. Of course, my favorite says is "if it can be null, it will be null".
Be sure to check out our guide to exception handling.
The post Software Error vs Exception – In Real World Examples appeared first on Stackify.
Latest AJAXWorld RIA Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
SYS-CON Featured Whitepapers
Most Read This Week