note 8470 deleted from Error Handling by zak
| From: | zak@php.net | Date: | Thu, 14 Sep 2000 03:52:45 +0000 |
| Subject: | note 8470 deleted from Error Handling by zak | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4882@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