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
-
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.
-
array
getTraces((Exception) $exception, $format = 'plain')
Returns an array of exception traces.
-
setWrappedException($e)
Changes the wrapped exception.
-
printStackTrace()
Prints the stack trace for this exception.
-
createFromException($e)
Wraps an Exception.
-
string
fileExcerpt($file, $line)
Returns an excerpt of a code file around the given line number.
-
outputStackTrace($exception)
Gets the stack trace for this exception.
Method Details
-
(string) formatArgs ($args, $single = false, $format = 'html')
| $args |
The argument array |
| $format |
The format string (html or plain) |
Formats an array as a string.
-
(string) formatArrayAsHtml ($values)
Returns an HTML version of an array as YAML.
returns An HTML string
-
(array) getTraces ((Exception) $exception, $format = 'plain')
| $exception |
An Exception implementation instance |
| $format |
The trace format (plain or html) |
Returns an array of exception traces.
returns An array of traces
-
setWrappedException ($e)
Changes the wrapped exception.
-
printStackTrace ()
Prints the stack trace for this exception.
-
createFromException ($e)
Wraps an Exception.
returns An sfException instance that wraps the given Exception object
-
(string) fileExcerpt ($file, $line)
| $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
-
outputStackTrace ($exception)
Gets the stack trace for this exception.
|