cookxml.core.exceptionhandler
Class DebugExceptionHandler

java.lang.Object
  extended by cookxml.core.exceptionhandler.DebugExceptionHandler
All Implemented Interfaces:
ExceptionHandler

public class DebugExceptionHandler
extends Object
implements ExceptionHandler

This exception handler output the message and exception if assertion is enabled. Otherwise, it just silently ignore them.

Since:
CookXml 2.0

Method Summary
static ExceptionHandler getInstance()
           
 void handleException(String msg, Exception ex)
          This function handles the exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ExceptionHandler getInstance()

handleException

public void handleException(String msg,
                            Exception ex)
                     throws CookXmlException
Description copied from interface: ExceptionHandler
This function handles the exception. To generate an error that halts the parsing process of the DecodeEngine, throw a CookXmlException. To tolerate the exception, just do not do anything.

Specified by:
handleException in interface ExceptionHandler
Parameters:
msg - The message that goes along with the exception.
ex - The exception to be handled.
Throws:
CookXmlException - The only type of exception this handler should throw.