Re: exceptions instead of errors
| From: | (Marcus Börger) | Date: | Mon, 05 May 2003 17:06:02 +0000 |
| Subject: | Re: exceptions instead of errors | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1275@lists.php.net to get a copy of this message | ||
At 12:59 05.05.2003, Daniel Lorch wrote:
Read more here: http://java.sun.com/docs/books/tutorial/essential/exceptions/definition.html Basically try/catch-statements allow you to keep the main code block short and readable because the error handling code is moved somewhere else. Would be nice seeing this in PHP.Then basically you did the main error with exceptions. They are exceptions. So the normal error handling should still be done by rceiving error codes or reacting on the return values of functions. However it is possible to move all error handling into a catch block... There is only one thing that cannot be solved other than with excetions and that is error situations in constructors. regards marcus