DEV Community

Discussion on: Exceptions are meant to be exceptional

Collapse
 
bbessa profile image
Bernardo Bessa • Edited

I think we are aiming on the same spot, but with different perspectives :D

When I mentioned unexpected exceptions, I'm talking about behaviours that are not controlled by us (as developers of our own source code). If you rely on a framework, or library, and you are not into developing on it, there are some behaviours that you can predict, but you can't improve - those are the kind of unexpected behaviours that I'm talking about.

All the exceptions thrown by your own source code should be treated as bugs, not as exceptions!

Exceptions shouldn't be seen as bug handlers, but failure management mechanisms to manage communication between different pieces of software.