Is it bad to throw exceptions to trigger server errors, eg. 404 Page Not Found?
Posted
by Pheter
on Stack Overflow
See other posts from Stack Overflow
or by Pheter
Published on 2010-05-07T17:48:26Z
Indexed on
2010/05/07
17:58 UTC
Read the original article
Hit count: 229
I am working on a PHP framework and am currently designing error handling. Based on what I have read on SO, I should only use exceptions for, well, exceptional situations. Therefore throwing an exception when an incorrect password is entered is wrong.
Should I avoid using exceptions when I want to trigger a server error? If so, should I write my own error handling class?
© Stack Overflow or respective owner