Re: PHP 4.0 Bug #6136: Exception Handling
| From: | Stefan Livieratos | Date: | Sun, 13 Aug 2000 15:34:52 +0000 |
| Subject: | Re: PHP 4.0 Bug #6136: Exception Handling | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-28754@lists.php.net to get a copy of this message | ||
Hi,
in the meantime you can write and use your own error handler like
this:
function error_handler($type, $message, $filename, $lineno, $context) {
switch($type) {
case E_NOTICE:
break;
case E_USER_NOTICE:
break;
...
...
...
}
set_error_handler("error_handler");
All but fatal parsing errors are now handled by the 'error_handler'
function.
Regards,
Stefan
----- Original Message -----
From: <s.busch@billiton.de>
To: <php-dev@lists.php.net>
Sent: Sunday, August 13, 2000 4:21 PM
Subject: [PHP-DEV] PHP 4.0 Bug #6136: Exception Handling
> From: s.busch@billiton.de
> Operating system: linux
> PHP version: 4.0 Latest CVS (13/08/2000)
> PHP Bug Type: Feature/Change Request
> Bug description: Exception Handling
>
> Error handling: please please please add exception handling (some sort of
"try ... catch ... finally" as implemented in Java, C++, Delphi, ...) to
PHP.
>
> It is simply annoying to check function results for errors and to do error
handling in if-statements.
>
> Especially for the new MySQL-transactions such an exception-handling would
be great.
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>