Simple error handling/catching/avoidance
"Jacob Kruger" <[email protected]>
| Newsgroups | gmane.comp.php.windows |
|---|---|
| Message-ID | <4BE6ECF927C24B6EB495D2A7AA665D4D@jakesPC> |
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...'