com.ibm.commerce.exception
Class ExceptionHandler

java.lang.Object
  |
  +--com.ibm.commerce.exception.ExceptionHandler

public class ExceptionHandler
extends java.lang.Object

This class contains methods helper methods for converting Exceptions to ECExceptions and generating ECExceptions. This class is for internal use only.


Constructor Summary
ExceptionHandler()
          Constructor for ExceptionHandler.
 
Method Summary
static  ECException convertToECException(java.lang.Exception e)
          Converts from an Exception to an ECException object.
static void displayJspException(HttpServletRequest request, HttpServletResponse response, java.lang.Exception e)
          Forwards the exception to a GenericSystemError view task to display the associated generic system error JSP.
static  TypedProperty getExceptionProperties(java.lang.Exception e)
          Gets the exception property
static CommandException getRootCommandException(CommandException e)
          Gets the root exception from the CommandException.
static  ErrorDataBean handleJspException(HttpServletRequest request, HttpServletResponse response, java.lang.Exception e)
          Handles the JSP exception and gets an error databean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionHandler

public ExceptionHandler()
Constructor for ExceptionHandler.
Method Detail

convertToECException

public static ECException convertToECException(java.lang.Exception e)
Converts from an Exception to an ECException object.
Parameters:
e - an exception to be anaylzed
Returns:
an ECException object

displayJspException

public static void displayJspException(HttpServletRequest request,
                                       HttpServletResponse response,
                                       java.lang.Exception e)
                                throws ServletException
Forwards the exception to a GenericSystemError view task to display the associated generic system error JSP. It is called by a JSP when it detects a exception.
Parameters:
request - HttpServletRequest
response - HttpServletResponse
e - java.lang.Exception
Throws:
ServletException

getExceptionProperties

public static TypedProperty getExceptionProperties(java.lang.Exception e)
Gets the exception property
Parameters:
e - Exception
Returns:
exception properties

getRootCommandException

public static CommandException getRootCommandException(CommandException e)
Gets the root exception from the CommandException. The root exception can be the CommandException itself or an ECException
Parameters:
e - an exception to be anaylzed

handleJspException

public static ErrorDataBean handleJspException(HttpServletRequest request,
                                               HttpServletResponse response,
                                               java.lang.Exception e)
Handles the JSP exception and gets an error databean.
Parameters:
request - HttpServletRequest
response - HttpServletResponse
e - java.lang.Exception