RE: [PHP-WIN] PHP 5 try catch block
| From: | Charles P. Killmer | Date: | Mon, 17 May 2004 19:50:03 +0000 |
| Subject: | RE: [PHP-WIN] PHP 5 try catch block | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-23744@lists.php.net to get a copy of this message | ||
I am trying to catch any error that could occur not just account for the
ones that I can think of. But yes I do use isset pretty often. But I
am looking for something to catch any error before the script bombs out.
Charles Killmer
-----Original Message-----
From: Daniel Anderson [mailto:shadowedmyth@hotmail.com]
Sent: Monday, May 17, 2004 12:58 PM
To: Charles P. Killmer
Subject: Re: [PHP-WIN] PHP 5 try catch block
Have you tried the if statement with the isset command?
For example:
**********
$SomeVariable = "NoneTheLess";
if (!isset($SomeVariables))
{
echo "Variable is not set!";
}
**********
----- Original Message -----
From: "Charles P. Killmer" <charlesk@netgaintechnology.com>
To: <php-windows@lists.php.net>
Sent: Monday, May 17, 2004 6:50 PM
Subject: [PHP-WIN] PHP 5 try catch block
Has anyone figured out how to catch fatal errors? Something like a
script like this with an obvivous parse error.
<?php
try {
bar = foo;
} catch (Exception $exception) {
echo "hello";
}
?>
I want to know how to catch any klind of error so I can deal with it
gracefully instead of crashing the CGI.
Charles Killmer
Netgain Technology
CharlesK@NetgainTechnology.com
Office: (320) 251-4700 ext 107