Simple error handling/catching/avoidance
| From: | Jacob Kruger | Date: | Fri, 08 Jun 2012 11:29:39 +0000 |
| Subject: | Simple error handling/catching/avoidance | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-30897@lists.php.net to get a copy of this message | ||
Just wondering why the following code actually renders an error message instead of just then
invoking the catch clause:
//start code
$iVar1 = 0;
$iVar2 = 10;
try {
echo $iVar2 / $iVar1;
} catch (Exception $e) {
echo "No division by zero allowed";
}
//end of code
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'