Re: Error messages configuration
| From: | John W. Holmes | Date: | Wed, 07 Apr 2004 13:32:44 +0000 |
| Subject: | Re: Error messages configuration | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182619@lists.php.net to get a copy of this message | ||
From: "Germán M. Rivera" <rivera@dit.upm.es>
> I would like to know if it is possible to change the format of error
> and warning messages that PHP shows. Now my error notifications look like:
>
> [Fatal error | Warning | ...]: <error> in <file> on line <line>.
>
> It would be helpful for me that those messages included some
> additional information, like the output of print_r(debug_backtrace()).
> Is there any way to change those messages?
You can use set_error_handler() to capture and reformat some of them.
http://us2.php.net/manual/en/function.set-error-handler.php
Note: The following error types cannot be handled with a user defined
function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR
and E_COMPILE_WARNING.
---John Holmes...