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:[EMAIL PROTECTED] 
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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
[EMAIL PROTECTED]
Office: (320) 251-4700 ext 107
 

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

Reply via email to