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()
          ExceptionHandler constructor.
 
Method Summary
static ECException convertToECException(java.lang.Exception e)
          Convert from an Exception to an ECException object.
static void displayJspException(com.ibm.commerce.exception.HttpServletRequest request, com.ibm.commerce.exception.HttpServletResponse response, java.lang.Exception e)
          This method will forward 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(com.ibm.commerce.exception.HttpServletRequest request, com.ibm.commerce.exception.HttpServletResponse response, java.lang.Exception e)
          This method returns 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()
ExceptionHandler constructor.
Method Detail

convertToECException

public static ECException convertToECException(java.lang.Exception e)
Convert from an Exception to an ECException object.

Parameters:
e - an exception to be anaylzed
Returns:
ECException - an ECException

displayJspException

public static void displayJspException(com.ibm.commerce.exception.HttpServletRequest request,
                                       com.ibm.commerce.exception.HttpServletResponse response,
                                       java.lang.Exception e)
                                throws com.ibm.commerce.beans.ServletException
This method will forward 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

getExceptionProperties

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

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:
commandException - CommandException - an exception to be anaylzed

handleJspException

public static ErrorDataBean handleJspException(com.ibm.commerce.exception.HttpServletRequest request,
                                               com.ibm.commerce.exception.HttpServletResponse response,
                                               java.lang.Exception e)
This method returns an error databean.

Parameters:
request - HttpServletRequest
response - HttpServletResponse
e - java.lang.Exception