RES: [PHP] exception handling
| From: | Thiago Pojda | Date: | Mon, 26 May 2008 12:43:29 +0000 |
| Subject: | RES: [PHP] exception handling | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274696@lists.php.net to get a copy of this message | ||
Someone please correct me if I'm wrong but I'm not sure you can do that at
all, it's not like building HTML files, PHP needs to parse it before
executing.
Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
thiago.pojda@softpartech.com.br
Excelência em Softwares Financeiros
-----Mensagem original-----
De: Sandro Felicioni [mailto:s.felicioni@gmx.ch]
Enviada em: domingo, 25 de maio de 2008 11:20
Para: php-general@lists.php.net
Assunto: [PHP] exception handling
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
------------
--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php