When to use exception, or When not to use exception

From: Date: Wed, 21 Feb 2007 16:28:56 +0000
Subject: When to use exception, or When not to use exception
Groups: php.general 
Request: Send a blank email to php-general+get-249193@lists.php.net to get a copy of this message
Hello list, Recently I upgraded my dev environment and started to use PHP5 at last! Compared with the former one, PHP5 rocks in many ways. So I love it so much, but sadly, I don't exactly know when to use exception. I'm never used to use Java, or languages that support exceptin so I have to learn the usage.. So, my question is When to use, or when not to use exception? Now I'm using exception in 99% to handle errors because it's easier and cleaner. The only problem I have using exception instead of normal "if-error-then" method is that I have to define logs of Exception-derived classes to effectively handling erros. It's cumbersome but not so bad compared with traditional error handling. Any suggestions, personal guidelines, tutoriral, documentation would be greatly appriciated.

« previous php.general (#249193) next »