I understand it's intended use and how to use it, have just not found a good use
for it yet.
Martin Alterisio wrote:
It's not supposed to be practical, it's just a way to handle errors. You
shouldn't rely on try/catch for algorithm implementation.
You create exceptions for errors and unexpected behavior. Then in some other
part of the system you use try/catch to prevent the code from terminating
abruptly. You catch the exception (you should know which exceptions can be
thrown), and act accordingly. Either closing resources, add a log message
with debug information, and/or sending an error message to the user.
2007/12/23, Al <news@xxxxxxxxxxxxx>:
Try() and Catch() seems neat; but, I've not found it to be very practical.
Anyone using it? How?
Al...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php