This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/includes/kohana/modules/userguide/guide/debugging.errors.md
2011-05-03 09:49:01 +10:00

852 B

Error/Exception Handling

Kohana provides both an exception handler and an error handler that transforms errors into exceptions using PHP's ErrorException class. Many details of the error and the internal state of the application is displayed by the handler:

  1. Exception class
  2. Error level
  3. Error message
  4. Source of the error, with the error line highlighted
  5. A debug backtrace of the execution flow
  6. Included files, loaded extensions, and global variables

Example

Click any of the links to toggle the display of additional information:

{{userguide/examples/error}}

Disabling Error/Exception Handling

If you do not want to use the internal error handling, you can disable it when calling [Kohana::init]:

Kohana::init(array('errors' => FALSE));