Re: RES: [PHP] exception handling
| From: | Aschwin Wesselius | Date: | Mon, 26 May 2008 12:42:57 +0000 |
| Subject: | Re: RES: [PHP] exception handling | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274697@lists.php.net to get a copy of this message | ||
Thiago Pojda wrote:
Hello, I've a question regarding the exception handling in PHP 5. In my php script I created a try catch block in order to catch throwing exceptions. The problem is that my try - block starts at the end of a php file, but ends in a different one. This always leads to the following error: "Parse error: syntax error, unexpected $end ". I hope you could tell me how to resolve this problem. Thanks and kind regards Sandro Felicioni e.g.: start top.php ------------- try{ end top.php ----------- start main.php -------------- require_once("top.php"); execute some critical php code }catch(Exception $e){ doSomething(); } end main.php -------------- end main.php ------------Hi, Maybe you can read upon it about 'trigger_error': http://www.php.net/*trigger_error * -- Aschwin Wesselius /'What you would like to be done to you, do that to the other....'/