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.
-
__construct($message = null, $code)
Class constructor.
-
setName($name)
Sets the name of this exception.
-
string
formatArrayAsHtml($values)
Returns an HTML version of an array as YAML.
-
array
getTraces((Exception) $exception, $format = 'plain')
Returns an array of exception traces.
-
string
getName()
Retrieves the name of this exception.
-
printStackTrace((Exception) $exception = null)
Prints the stack trace for this exception.
-
string
fileExcerpt($file, $line)
Returns an excerpt of a code file around the given line number.
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.
-
__construct ($message = null, $code)
| $message |
The error message |
| $code |
The error code |
Class constructor.
-
setName ($name)
Sets the name of this exception.
-
(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
-
(string) getName ()
Retrieves the name of this exception.
returns This exception's name
-
printStackTrace ((Exception) $exception = null)
| $exception |
An Exception implementation instance |
Prints the stack trace for this exception.
-
(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
|