Closed slava-vishnyakov closed 11 years ago
Actually they are supported and work fine for me.Are you sure you've set up everything right?
No, not sure. It worked for most of errors, like fatals and warning. But it failed to catch out-of-memory error. It did catch other fatals though. I've had to stop using PHP-Error though, due to the fact that it outputs a lot of scripts which mess up XML output (scripts are there even if there is no error). Other that that it's a cool lib.
@slava-vishnyakov are you setting the 'content-type' in the header? You should be if you are transferring XML documents (regardless of if you are using PHP Error or not).
If the content type is HTML, XHTML, or there is no type at all, then PHP Error presumes you are outputting a HTML page.
If you are setting a content type, then this is a bug, and I'd be interested in more info.
re fatal errors, they cannot be fully supported at the PHP level. PHP does not allow you to catch every single type of bug, unless you hook into PHP it's self, using a dll (like xdebug does). So for technical reasons, I cannot support them.
@JosephLenton The problem is that - I setup error handling way before the actual controller kicks in, which sets the Content-Type, but by that time - the first output of PHPError is already there. At least that's how I remember it.
Ok, thanks. I will play around with replicating this bug.
Please add support for fatal errors - this can be done via
register_shutdown_function
anderror_get_last
http://stackoverflow.com/questions/277224/how-do-i-catch-a-php-fatal-errorOtherwise - great library! Thanks!
Triggering fatal that is not handled by
PHP-Error
: