oxExceptionHandler Class Reference

List of all members.


Detailed Description

Exception handler, deals with all high level exceptions (caught in oxshopcontrol)

Public Member Functions

 __construct ($iDebug=0)
 setIDebug ($iDebug)
 setLogFileName ($sFile)
 getLogFileName ()
 handleUncaughtException (Exception $oEx)
 __call ($sMethod, $aArgs)

Protected Member Functions

 _uncaughtException (oxException $oEx)
 _dealWithNoOxException (Exception $oEx)
 _safeShopRedirectAndExit ($sUrl)

Protected Attributes

 $_sFileName = 'EXCEPTION_LOG.txt'
 $_iDebug = 0

Constructor & Destructor Documentation

oxExceptionHandler.__construct ( iDebug = 0  ) 

Class constructor

Parameters:
integer $iDebug denug level


Member Function Documentation

oxExceptionHandler.setIDebug ( iDebug  ) 

Set the debug level

Parameters:
int $iDebug debug level (0== no debug)
Returns:
null

oxExceptionHandler.setLogFileName ( sFile  ) 

Set log file path/name

Parameters:
string $sFile file name
Returns:
null

oxExceptionHandler.getLogFileName (  ) 

Get log file path/name

Returns:
string

oxExceptionHandler.handleUncaughtException ( Exception oEx  ) 

Uncaught exception handler, deals with uncaught exceptions (global)

Parameters:
Exception $oEx exception object
Returns:
null

oxExceptionHandler._uncaughtException ( oxException oEx  )  [protected]

Deal with uncaught oxException exceptions. IMPORTANT: uses _safeShopRedirectAndExit(), see description

Parameters:
oxException $oEx Exception to handle
Returns:
null

oxExceptionHandler._dealWithNoOxException ( Exception oEx  )  [protected]

No oxid exception, just write log file. IMPOARTANT: uses _safeShopRedirectAndExit(), see description

Parameters:
Exception $oEx exception object
Returns:
null

oxExceptionHandler._safeShopRedirectAndExit ( sUrl  )  [protected]

Only redirect if not in unit testing. This function will not return as its redirects browser and dies. And in unit tests we just return in order not to stop other tests.

Parameters:
string $sUrl redirect url
Returns:
null

oxExceptionHandler.__call ( sMethod,
aArgs 
)

Only used for convenience in UNIT tests by doing so we avoid writing extended classes for testing protected or private methods

Parameters:
string $sMethod Methods name
array $aArgs Argument array
Exceptions:
oxSystemComponentException Throws an exception if the called method does not exist or is not accessable in current class
Returns:
string


Member Data Documentation

oxExceptionHandler.$_sFileName = 'EXCEPTION_LOG.txt' [protected]

oxExceptionHandler.$_iDebug = 0 [protected]


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

Generated on Wed Oct 29 23:44:21 2008 for OXID eShop CE by  doxygen 1.5.5