views:

24

answers:

2

i wonder why some errors can be rendered in the error controller but some are just output inline like a normal php script would. most of the time, with 'inline' errors, the whole page is blank apart from the error

+3  A: 

This could be due to a number of factors, the most relevant probably are :

  1. It's a fatal error : the PHP interpreter ALWAYS stops on fatal errors, if you have display_errors in php.ini set to on (or 1) then they will also be displayed in the browser.
  2. You have some code with a die statement. Again, PHP will stop executing your script and echo whatever you gave as parameter to the die call.
wimvds
+1  A: 

I believe that the ErrorController picks up Exceptions, provided that the front controller is configured to route them to the ErrorController. Otherwise, it's standard PHP error handling as specified by display_errors and any error handler registered with set_error_handler().

David Weinraub