Class WFException

Description

A helper class to easily throw named exceptions.

The "name" field has been added for consistency with the way Cocoa handles exceptions. This allows components to easily define "exception names" in the conventional format of:

  1.  define('MyProblemException''MyProblemException');

Using named exceptions makes it easier to keep track of exceptions across than with exception codes.

  • todo: Need to have all PHOCOA exceptions that are thrown switched to WFException so code can distinguish b/w PHOCOA and external exceptions.

Located in /framework/WFException.php (line 29)

Exception
   |
   --WFException
Direct descendents
Class Description
WFDieselSearch_ParseException A helper class to easily throw named exceptions.
WFRedirectRequestException Helper class to allow modules to easily redirect the client to a given URL.
WFRequestController_NotFoundException A helper class to easily throw named exceptions.
WFRequestController_BadRequestException A helper class to easily throw named exceptions.
Variable Summary
string $name
Method Summary
static void raise ([string $name = WFGenericException], [ $message = NULL])
WFException __construct ([ $message = NULL], [ $code = 0])
void name ()
void setName ( $name)
Variables
string $name (line 34)
  • var: The name of the exception.
  • access: protected

Inherited Variables

Inherited from Exception (Internal Class)

$code
$file
$line
$message
$string
$trace
Methods
static method raise (line 57)

Raise an exception of the passed type with the passed message.

  • throws: WFException Throws a WFException of the passed type. Default is NULL.
static void raise ([string $name = WFGenericException], [ $message = NULL])
  • string $name: The name / code of the exception. Default is WFGenericException.
  • $message
Constructor __construct (line 45)
WFException __construct ([ $message = NULL], [ $code = 0])
  • $message
  • $code

Redefinition of:
Exception::constructor __construct ( [$message = ], [$code = ] )

Redefined in descendants as:
name (line 40)
void name ()
setName (line 36)
void setName ( $name)
  • $name

Inherited Methods

Inherited From Exception (Internal Class)

constructor __construct ( [$message = ], [$code = ] )
getCode ( )
getFile ( )
getLine ( )
getMessage ( )
getTrace ( )
getTraceAsString ( )
__clone ( )
__toString ( )

Documentation generated on Thu, 07 Aug 2008 10:36:44 -0400 by phpDocumentor 1.4.1