note 8470 added to Error Handling
| From: | isanhaji at insight dot com | Date: | Thu, 14 Sep 2000 03:33:14 +0000 |
| Subject: | note 8470 added to Error Handling | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4878@lists.php.net to get a copy of this message | ||
Hi there php experts;
I'm wondering how can i handle exceptions like java [try{...} catch{}] way.
My goal is to take a block of instruction and catch any error at the end.
This helps me to have one condition for one block that i can determine, rather than
"polluating" code with multiple if then else......
here's a deseperate attempt, the problem is that the execution continue after ther error;
error_reporting(0);
$t1 = 123;
$t2 = 0;
$total = $t1/$t2;
//....
if ($php_errormsg)
echo "error = $php_errormsg";
thanks
http://www.php.net/manual/features.error-handling.php