Reason to use exceptions:
- If you forget to catch an exceptional circumstance, your program will die and the stack trace will tell you exactly why. If you forget to handle the return value for an exception circumstance there is not telling how far away your program will exhibit incorrect behavior.
- Using return values only works if there is a sentinel value you can return. If all possible return values are already valid, what are you going to do?
- An exception will carry additional information about what happened which may be useful.
Reasons not to use exceptions:
- Many languages aren't designed to make exceptions fast.
- Exceptions which travel several layers up the stack can leave inconsistent state in their wake
My policy:
I use exception in two cases that might be considered flow control. I might catch an exception immediately after its thrown. For example a KeyError from a dictionary. The problems with exception don't really exhibit themeselves over such short distances.
The other case is when giving up on a more complex task, such as parsing command line arguments. I just put my complaint in an exception and throw it.