Thanks.  Is there any way to catch fatal errors, and have the script do
something else more gracefull.  Like maybe log the error and redirect or
something. 

Charles

-----Original Message-----
From: Vincent Jansen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 3:03 AM
To: Charles P. Killmer; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] PHP 5 try catch block

You can only catch exceptions.

<?php
try {
        ....Script with lots of fatal errors.....
} catch (Exception $exception) {
   echo "all ok";
}
?>

will allways result in fatal error

<?php
try {
        throw new Exception();
} catch (Exception $exception) {
   echo "all ok";
}
?>

results in "all ok" though.

Vincent

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to