sfException is the base class for all symfony related exceptions and
provides an additional method for printing up a detailed view of an
exception.
Method Summary
-
createFromException($e)
Wraps an Exception.
-
string
escape($value)
Escapes a string value with html entities
-
string
fileExcerpt($file, $line)
Returns an excerpt of a code file around the given line number.
-
string
formatArgs($args, $single = false, $format = 'html')
Formats an array as a string.
-
string
formatArrayAsHtml($values)
Returns an HTML version of an array as YAML.
-
string|Boolean
getTemplatePathForError($format, (Boolean) $debug)
Returns the path for the template error message.
-
array
getTraces((Exception) $exception, $format = 'plain')
Returns an array of exception traces.
-
outputStackTrace($exception)
Gets the stack trace for this exception.
-
printStackTrace()
Prints the stack trace for this exception.
-
setWrappedException($e)
Changes the wrapped exception.
Method Details
-
createFromException ($e)
Browse code
Wraps an Exception.
returns An sfException instance that wraps the given Exception object
-
(string) escape ($value)
Browse code
Escapes a string value with html entities
-
(string) fileExcerpt ($file, $line)
Browse code
| $file |
A file path
|
| $line |
The selected line number
|
Returns an excerpt of a code file around the given line number.
returns An HTML string
-
(string) formatArgs ($args, $single = false, $format = 'html')
Browse code
| $args |
The argument array
|
| $single |
|
| $format |
The format string (html or plain)
|
Formats an array as a string.
-
(string) formatArrayAsHtml ($values)
Browse code
Returns an HTML version of an array as YAML.
returns An HTML string
-
(string|Boolean) getTemplatePathForError ($format, (Boolean) $debug)
Browse code
| $format |
The request format
|
| $debug |
Whether to return a template for the debug mode or not
|
Returns the path for the template error message.
returns false if the template cannot be found for the given format, the absolute path to the template otherwise
-
(array) getTraces ((Exception) $exception, $format = 'plain')
Browse code
| $exception |
An Exception implementation instance
|
| $format |
The trace format (plain or html)
|
Returns an array of exception traces.
returns An array of traces
-
outputStackTrace ($exception)
Browse code
Gets the stack trace for this exception.
-
Prints the stack trace for this exception.
-
setWrappedException ($e)
Browse code
Changes the wrapped exception.
|