|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35626 throwing an exception in error handler is makeing it display a warning
Submitted: 2005-12-10 22:49 UTC Modified: 2005-12-11 13:52 UTC
From: elg at op dot pl Assigned:
Status: Not a bug Package: Compile Warning
PHP Version: 5.1.1 OS: windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: elg at op dot pl
New email:
PHP Version: OS:


 [2005-12-10 22:49 UTC] elg at op dot pl
I wanted to convert errors to exceptions by writing an error handler that throws them as exceptions.
Then I wanted to check if it works so I tried to include a non  existing file (info.txt)

Reproduce code:
function exceptionHandler($exc){
echo ':)';
function ErrorsToExceptions($severity, $message) {
	throw new ErrorException($message,0, $severity);

Expected result:

Actual result:
Warning: main() [function.include]: Failed opening 'info.txt' for inclusion (include_path='.;C:\php5\pear') in
E:\usr\\www\index.php on line 8


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-10 22:59 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

You're using exception handler that apparently makes exceptions to disappear. 
 [2005-12-11 13:52 UTC] elg at op dot pl
If I've miss undersend your sugestion then I'm truelly sory but I know that my exceptions handler makes nothing with cought exception and I dont think this is the problem. Even if there would be no exception handler or if it would write this exception information into a file it should not display this worning (in fact it is not showing any warnings when I am not throwing exceptions in error handler). Sory for taking your time with this problem but I have searched many forums for help and there was nobody that could help me :(
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 21:01:32 2024 UTC