RE: PHP 5 try catch block

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

 



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@xxxxxxxxxxx] 
Sent: Monday, May 17, 2004 12:58 PM
To: Charles P. Killmer
Subject: Re:  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@xxxxxxxxxxxxxxxxxxxxx>
To: <php-windows@xxxxxxxxxxxxx>
Sent: Monday, May 17, 2004 6:50 PM
Subject:  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@xxxxxxxxxxxxxxxxxxxxx
Office: (320) 251-4700 ext 107
 

-- 
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