symfony API

sfException Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.1 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.1 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfException is the base class for all symfony related exceptions and

Method Summary

  • sfException 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, $format)
    Formats an array as a string.
  • string formatArrayAsHtml($values)
    Returns an HTML version of an array as YAML.
  • array getTraces($exception, $format)
    Returns an array of exception traces.
  • outputStackTrace()
    Gets the stack trace for this exception.
  • printStackTrace()
    Prints the stack trace for this exception.
  • setWrappedException($e)
    Changes the wrapped exception.

Method Details

  • (sfException) createFromException ($e) Browse code

    $e An Exception instance

    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 plain)

    Formats an array as a string.

  • (string) formatArrayAsHtml ($values) Browse code

    $values The values array

    Returns an HTML version of an array as YAML.

    returns An HTML string

  • (array) getTraces ($exception, $format) 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 () Browse code

    Gets the stack trace for this exception.

  • printStackTrace () Browse code

    Prints the stack trace for this exception.

  • setWrappedException ($e) Browse code

    $e An Exception instance

    Changes the wrapped exception.