SErrorManager Class Reference
[Undocumented Classes]

Unified error management and reporting facility. More...

List of all members.

Public Member Functions

 registerShutdownFunction ($cb)
 INSERT BRIEF DESCRIPTION HERE.
 setEmail ($email, $onFatal=true, $onError=false, $onWarning=false, $onDebug=false)
 INSERT BRIEF DESCRIPTION HERE.

Static Public Member Functions

static clearDebug ()
 Removes any pending debug messages.
static clearErrors ()
 Removes any pending errors.
static clearWarnings ()
 Removes any pending warnings.
static failsafe_show_errors ()
 INSERT BRIEF DESCRIPTION HERE.
static getAllDebug ($all=false)
 Retrieve all pending debug messages.
static getAllErrors ($all=false)
 Retrieve all pending error messages.
static getAllWarnings ($all=false)
 Retrieve all pending warning messages.
static getLastError ($all=false)
 Retrieves the last system error.
static getLastWarning ($all=false)
 Retrieves the last system warning.
static initialize ()
 INSERT BRIEF DESCRIPTION HERE.
static php_error_handler ($errno, $errstr, $errfile, $errline, $errcontext)
 INSERT BRIEF DESCRIPTION HERE.
static prm_printMessages ()
 INSERT BRIEF DESCRIPTION HERE.
static redirectPop ($type)
 INSERT BRIEF DESCRIPTION HERE.
static redirectPush ($type, $redir)
 INSERT BRIEF DESCRIPTION HERE.
static restoreDebug ($debug)
 Sets pending debug array to given parameter.
static restoreErrors ($errors)
 Sets pending errors array to given parameter.
static restoreWarnings ($warnings)
 Sets pending warnings array to given parameter.
static setDebug ($msg)
 Displays a debug message.
static setEnablePHPErrors ($enablePHP)
 INSERT BRIEF DESCRIPTION HERE.
static setError ($msg, $forUser=false)
 Indicates an error has occurred.
static setUserError ($msg)
 Alias for setError($msg, true).
static setWarning ($msg)
 Indicates a warning has occurred.
static sobj_setDebug ($msg, $ignoreHowMany=1)
 INSERT BRIEF DESCRIPTION HERE.
static sobj_setError ($msg, $forUser, $ignoreHowMany=1)
 INSERT BRIEF DESCRIPTION HERE.
static sobj_setWarning ($msg, $ignoreHowMany=1)
 INSERT BRIEF DESCRIPTION HERE.


Detailed Description

Unified error management and reporting facility.

All errors are now reported through this interface. Errors, warnings and debug messages appear in a special part of the Flash slot at the top of the page. The existing system of setting errors on objects derived from SObject is still supported, but those errors will now also show up in the listing in the flash slot. INSERT BRIEF DESCRIPTION HERE INSERT FULL DESCRIPTION HERE

Author:
AUTHOR (DATE)

Member Function Documentation

static SErrorManager::clearDebug (  )  [static]

Removes any pending debug messages.

You can use this as part of debug capturing (see also ~:getAllDebug% and ~:restoreDebug%)

static SErrorManager::clearErrors (  )  [static]

Removes any pending errors.

You can use this as part of error capturing (see also ~:getAllErrors% and ~:restoreErrors%)

static SErrorManager::clearWarnings (  )  [static]

Removes any pending warnings.

You can use this as part of warning capturing (see also ~:getAllWarnings% and ~:restoreWarnings%)

static SErrorManager::failsafe_show_errors (  )  [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::getAllDebug ( all = false  )  [static]

Retrieve all pending debug messages.

Parameters:
$all [boolean]: if false, just get the messages in an array, if true, get additional information, which looks like this:
  • [0] => debug message
  • [1] => backtrace output from debug_backtrace()
  • [2] => levels of backtrace to skip
Returns:
[array]: array of debug messages or information

static SErrorManager::getAllErrors ( all = false  )  [static]

Retrieve all pending error messages.

Parameters:
$all [boolean]: if false, just get the messages in an array, if true, get additional information, which looks like this:
  • [0] => error message
  • [1] => backtrace output from debug_backtrace()
  • [2] => levels of backtrace to skip
Returns:
[array]: array of error messages or information

static SErrorManager::getAllWarnings ( all = false  )  [static]

Retrieve all pending warning messages.

Parameters:
$all [boolean]: if false, just get the messages in an array, if true, get additional information, which looks like this:
  • [0] => warning message
  • [1] => backtrace output from debug_backtrace()
  • [2] => levels of backtrace to skip
Returns:
[array]: array of warning messages or information

static SErrorManager::getLastError ( all = false  )  [static]

Retrieves the last system error.

You can use this function to get the last relevant error for the purposes of embedding it in a string for the user

Parameters:
$all [boolean]: whether to just return the error string, or all of the information, which is an array with three elements: [0] error message, [1] backtrace, [2] IGNORED
Returns:
[mixed]: string of error message or array with aforementioned information

static SErrorManager::getLastWarning ( all = false  )  [static]

Retrieves the last system warning.

You can use this function to get the last relevant warning for the purposes of embedding it in a string for the user

Parameters:
$all [boolean]: whether to just return the warning string, or all of the information, which is an array with three elements: [0] warning message, [1] backtrace, [2] IGNORED
Returns:
[mixed]: string of warning message or array with aforementioned information

static SErrorManager::initialize (  )  [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::php_error_handler ( errno,
errstr,
errfile,
errline,
errcontext 
) [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$errno [TYPE]: DESCRIPTION
$errstr [TYPE]: DESCRIPTION
$errfile [TYPE]: DESCRIPTION
$errline [TYPE]: DESCRIPTION
$errcontext [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::prm_printMessages (  )  [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::redirectPop ( type  )  [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$type [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::redirectPush ( type,
redir 
) [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$type [TYPE]: DESCRIPTION
$redir [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

SErrorManager::registerShutdownFunction ( cb  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$cb [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::restoreDebug ( debug  )  [static]

Sets pending debug array to given parameter.

If you don't want your script to fail with errors, you should only pass in a value that was retrieved from ~:getAllDebug% with an argument of 'true'. See documentation for that function for more on the layout of the debug array. Note that the internal format is subject to change, so it may not be safe to rely on any details in your own code.

Parameters:
$debug [array]: array of debug information, as described in ~:getAllDebug%

static SErrorManager::restoreErrors ( errors  )  [static]

Sets pending errors array to given parameter.

If you don't want your script to fail with errors, you should only pass in a value that was retrieved from ~:getAllErrors% with an argument of 'true'. See documentation for that function for more on the layout of the errors array. Note that the internal format is subject to change, so it may not be safe to rely on any details in your own code.

Parameters:
$errors [array]: array of error information, as described in ~:getAllErrors%

static SErrorManager::restoreWarnings ( warnings  )  [static]

Sets pending warnings array to given parameter.

If you don't want your script to fail with errors, you should only pass in a value that was retrieved from ~:getAllWarnings% with an argument of 'true'. See documentation for that function for more on the layout of the warnings array. Note that the internal format is subject to change, so it may not be safe to rely on any details in your own code.

Parameters:
$warnings [array]: array of warning information, as described in ~:getAllWarnings%

static SErrorManager::setDebug ( msg  )  [static]

Displays a debug message.

This debug message will only show up on the dev site

Parameters:
$msg [string]: debug message

SErrorManager::setEmail ( email,
onFatal = true,
onError = false,
onWarning = false,
onDebug = false 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$email [TYPE]: DESCRIPTION
$onFatal [TYPE]: DESCRIPTION
$onError [TYPE]: DESCRIPTION
$onWarning [TYPE]: DESCRIPTION
$onDebug [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::setEnablePHPErrors ( enablePHP  )  [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$enablePHP [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::setError ( msg,
forUser = false 
) [static]

Indicates an error has occurred.

This error message will only show up on the dev site unless you pass in 'true' as the 2nd parameter, in which case it will also appear in the user flash spot.

Parameters:
$msg [string]: error message
$forUser [boolean]: whether to show message in user flash slot, which is visible regardless of server

static SErrorManager::setUserError ( msg  )  [static]

Alias for setError($msg, true).

Parameters:
$msg [string]: error message

static SErrorManager::setWarning ( msg  )  [static]

Indicates a warning has occurred.

This warning message will only show up on the dev site

Parameters:
$msg [string]: warning message

static SErrorManager::sobj_setDebug ( msg,
ignoreHowMany = 1 
) [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$msg [TYPE]: DESCRIPTION
$ignoreHowMany [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::sobj_setError ( msg,
forUser,
ignoreHowMany = 1 
) [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$msg [TYPE]: DESCRIPTION
$forUser [TYPE]: DESCRIPTION
$ignoreHowMany [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

static SErrorManager::sobj_setWarning ( msg,
ignoreHowMany = 1 
) [static]

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$msg [TYPE]: DESCRIPTION
$ignoreHowMany [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION


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

Generated on Wed Nov 24 02:02:59 2010 for Common by  doxygen 1.5.6