- Symphony 2.7.5
-
› assets
14 -
› boot
15 -
› core
24 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
61 -
› interface
9 -
› toolkit
60 - Delegates101
- Deprecated28
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class GenericExceptionHandler
class.errorhandler.php #13GenericExceptionHandler will handle any uncaught exceptions thrown in
Symphony. Additionally, all errors in Symphony that are raised to Exceptions
will be handled by this class.
It is possible for Exceptions to be caught by their own ExceptionHandler
which can
override the render
function so that it can be displayed to the user appropriately.
Properties
static boolean $enabled
Whether the GenericExceptionHandler
should handle exceptions. Defaults to true
Methods
static string|false getTemplate(
$name)
Returns the path to the error-template by looking at the WORKSPACE/template/
directory, then at the TEMPLATES
directory for the convention *.tpl
. If
the template is not found, false
is returned
Parameters
Returns
String, which is the path to the template if the template is found, false otherwise
static string handler(Throwable $e)
The handler function is given an Throwable and will call it's render function to display the Throwable to a user. After calling the render function, the output is displayed and then exited to prevent any further logic from occurring.
Parameters
Returns
The result of the Throwable's render function
static void initialise(Log $Log)
Initialise will set the error handler to be the __CLASS__::handler
function.
Parameters
static boolean isValidThrowable(Throwable $e)
This function's goal is to validate the $e
parameter in order to ensure
that the object is an Exception
or a Throwable
instance.
Parameters
Returns
true when valid, false otherwise
static string render(Throwable $e)
The render function will take an Throwable and output a HTML page
Parameters
Returns
An HTML string
static string renderHtml(
$template, $heading, $message, $file, $line, $lines, $trace, $queries)
This function will fetch the desired $template
, and output the
Throwable in a user friendly way.
Parameters
Returns
The HTML of the formatted error message.
static void shutdown()
The shutdown function will capture any fatal errors and format them as a usual Symphony page.