RE: PHP 5 try catch block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux