symfony API

sfException Class

« Back to API menu

action

addon

autoload

cache

command

config

controller

creole

database

debug

exception

filter

form

generator

helper

i18n

log

plugin

propel

request

response

routing

storage

task

test

user

util

validator

view

widget

You are currently browsing the symfony documentation for the 1.1 version. Switch to:

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)

    $values The values array

    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)

    $e An Exception instance

    Changes the wrapped exception.

  • printStackTrace ()

    Prints the stack trace for this exception.

  • createFromException ($e)

    $e An Exception instance

    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.