sfException is the base class for all symfony related exceptions and
Inheritence
sfDoctrineException, sfActionException, sfValidatorException, sfFactoryException, sfFileException, sfRenderException, sfSecurityException, sfStorageException, sfInitializationException, sfParseException, sfError404Exception, sfFilterException, sfForwardException, sfCacheException, sfViewException, sfStopException, sfConfigurationException, sfDatabaseException, sfControllerException, sfCommandException, sfPluginException <
sfException
Method Summary
Method Details
-
Clears the $lastException property (added for #6342)
-
(sfException) 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, $format)
Browse code
| $args |
The argument array |
| $format |
The format string (html or txt) |
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) formatFile ($file, $line, $format, $text)
Browse code
| $file |
An absolute file path |
| $line |
The line number |
| $format |
The output format (txt or html) |
| $text |
Use this text for the link rather than the file path |
Formats a file path.
-
(Exception) getLastException ()
Browse code
Gets the last wrapped exception.
returns An Exception instance
-
(string|Boolean) getTemplatePathForError ($format, $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, $format)
Browse code
| $exception |
An Exception implementation instance |
| $format |
The trace format (txt or html) |
Returns an array of exception traces.
returns An array of traces
-
Gets the stack trace for this exception.
-
Prints the stack trace for this exception.
-
setWrappedException ($e)
Browse code
Sets the wrapped exception.
|