Re: Error Handling

From: Date: Fri, 09 Sep 2005 15:52:15 +0000
Subject: Re: Error Handling
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-222090@lists.php.net to get a copy of this message
* Chuck Brockman <cjbrockman@gmail.com>: > What is a good way to capture errors that occur. I've tried the > following code in development, but it still spits out an error (Parse > error: syntax error, unexpected '}', expecting ',' or ';' in > X:\xxxx\xxxx\xxxx.php on line 7) > > <? > // error handling test > > try{ > $test = 1; > echo $test1 You're missing a semicolon at the end of the above line. > } > catch (Exception $e) { > print "Exception caught\n"; > } > ?> -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/

« previous php.general (#222090) next »