The subject is interesting, but I think the author is wrong. Exceptions are, and should only be, about exceptional conditions. And yes, it IS hard to determine, if something is an exceptional condition. Especially when you are writing libraries for others. Is all depends on the subject.
Comments
lnguyen replied ago:
I've always preferred my own exceptions to returning null. I can include a lot of information in the exceptions that will help me debug.
pulesen replied ago:
The subject is interesting, but I think the author is wrong. Exceptions are, and should only be, about exceptional conditions. And yes, it IS hard to determine, if something is an exceptional condition. Especially when you are writing libraries for others. Is all depends on the subject.
Voters For This Link (16)
Voters Against This Link (0)