spunQ_LocalizedException Class Reference

An exception that has a localized message. More...

Inheritance diagram for spunQ_LocalizedException:

spunQ_Exception spunQ_DatabaseException spunQ_ExternalApplicationFailureException spunQ_FileFormatException spunQ_HtmlException spunQ_IllegalTypeDescriptorException spunQ_IllegalValueException spunQ_InfiniteRecursionException spunQ_InvalidObjectException spunQ_InvalidPropertyException spunQ_IOException spunQ_PropertyPathException spunQ_TypeMismatchException spunQ_TypeNotFoundException

List of all members.

Public Member Functions

 __construct ($translationKey=NULL, $translationParameters=array())
 Constructor.
 getExtendedMessage ()
 Will retrieve the localized message.
 getTranslationKey ()
 Returns the key used for localizing the message of this exception.
 getTranslationParameters ()
 Returns the parameters used for the localization of this exception.
 prettyPrint ($useHtml=false)
 Prints a nice error message including backtrace.
 prettyPrintHtml ()
 Prints a nice error message including backtrace - in html.
 printBacktrace ($indent=NULL)
 Prints the backtrace of this exception.
 getBacktrace ()
 Fetches the backtrace of this exception.

Protected Attributes

 $translationKey
 The key that will be used to create the localized message.
 $translationParameters
 The translation parameters as required by spunQ_Language::translate().
 $localizedParameters = array()
 Parameters that need to be localized.
 $backtrace = NULL
 The backtrace of this exception.


Detailed Description

An exception that has a localized message.

All exceptions thrown by the framework should actually be subclasses of this class, to make it possible to translate the whole framework.

Definition at line 8 of file LocalizedException.exception.php.


Constructor & Destructor Documentation

spunQ_LocalizedException::__construct ( translationKey = NULL,
translationParameters = array() 
)

Constructor.

The members $translationKey and $translationParameters should be set before this constructor is called, since they will be used to create the localized message.

Reimplemented in spunQ_IllegalTypeDescriptorException, spunQ_InvalidPropertyException, and spunQ_TypeMismatchException.

Definition at line 35 of file LocalizedException.exception.php.


Member Function Documentation

spunQ_Exception::getBacktrace (  )  [inherited]

Fetches the backtrace of this exception.

Returns:
spunQ.util.Backtrace

Definition at line 91 of file Exception.exception.php.

spunQ_LocalizedException::getExtendedMessage (  ) 

Will retrieve the localized message.

Returns:
string

Reimplemented from spunQ_Exception.

Definition at line 48 of file LocalizedException.exception.php.

spunQ_LocalizedException::getTranslationKey (  ) 

Returns the key used for localizing the message of this exception.

Returns:
string

Definition at line 73 of file LocalizedException.exception.php.

spunQ_LocalizedException::getTranslationParameters (  ) 

Returns the parameters used for the localization of this exception.

Returns:
array<string>

Definition at line 81 of file LocalizedException.exception.php.

spunQ_Exception::prettyPrint ( useHtml = false  )  [inherited]

Prints a nice error message including backtrace.

Parameters:
$useHtml Whether to generate html text. Will cause prettyPrintHtml() to be called.
Returns:
spunQ_Exception $this

Definition at line 45 of file Exception.exception.php.

spunQ_Exception::prettyPrintHtml (  )  [inherited]

Prints a nice error message including backtrace - in html.

Returns:
spunQ_Exception $this

Definition at line 63 of file Exception.exception.php.

spunQ_Exception::printBacktrace ( indent = NULL  )  [inherited]

Prints the backtrace of this exception.

Parameters:
$indent The string to prepend to every line. Will be passed to spunQ_Backtrace::toString().
Returns:
spunQ_Exception $this

Definition at line 82 of file Exception.exception.php.


Member Data Documentation

spunQ_Exception::$backtrace = NULL [protected, inherited]

The backtrace of this exception.

Type:
spunQ.util.Backtrace

Definition at line 12 of file Exception.exception.php.

spunQ_LocalizedException::$localizedParameters = array() [protected]

Parameters that need to be localized.

This array contains indexes of the $translationParameters array.

Type:
array<string>

Definition at line 27 of file LocalizedException.exception.php.

spunQ_LocalizedException::$translationKey [protected]

The key that will be used to create the localized message.

Type:
string

Definition at line 14 of file LocalizedException.exception.php.

spunQ_LocalizedException::$translationParameters [protected]

The translation parameters as required by spunQ_Language::translate().

Type:
array<string>

Definition at line 20 of file LocalizedException.exception.php.


The documentation for this class was generated from the following file:

Generated on Fri Jul 1 11:12:42 2011 for spunQ3 by  doxygen 1.5.9