ch.elca.el4j.tests.services.exceptionhandler
Class MessageBoxExceptionHandler

java.lang.Object
  extended by ch.elca.el4j.services.exceptionhandler.handler.AbstractExceptionHandler
      extended by ch.elca.el4j.tests.services.exceptionhandler.MessageBoxExceptionHandler
All Implemented Interfaces:
ExceptionHandler

public class MessageBoxExceptionHandler
extends AbstractExceptionHandler

This simple exception handler logs exception messages in a dialogue, printed to the standard out.

Author:
Andreas Bur (ABU)
File-location:
MessageBoxExceptionHandler
Last check-in date:
2009-08-04 15:17:52 +0200 (Di, 04. Aug 2009) by swismer for revision 3880

Field Summary
private static org.slf4j.Logger s_logger
          Logger.
static int s_numberOfHandleCalls
          Number of handle calls.
 
Constructor Summary
MessageBoxExceptionHandler()
           
 
Method Summary
private  void drawLine(int length, StringBuffer buffer)
          Draws a line consisting of hyphens.
protected  Object handleException(Throwable t, AbstractExceptionHandlerInterceptor exceptionInvoker, org.aopalliance.intercept.MethodInvocation invocation, org.slf4j.Logger logger)
          
 
Methods inherited from class ch.elca.el4j.services.exceptionhandler.handler.AbstractExceptionHandler
getInvocationDescription, handleException, setUseDynamicLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_logger

private static org.slf4j.Logger s_logger
Logger.


s_numberOfHandleCalls

public static int s_numberOfHandleCalls
Number of handle calls.

Constructor Detail

MessageBoxExceptionHandler

public MessageBoxExceptionHandler()
Method Detail

handleException

protected Object handleException(Throwable t,
                                 AbstractExceptionHandlerInterceptor exceptionInvoker,
                                 org.aopalliance.intercept.MethodInvocation invocation,
                                 org.slf4j.Logger logger)
                          throws Throwable

Specified by:
handleException in class AbstractExceptionHandler
Throws:
Throwable

drawLine

private void drawLine(int length,
                      StringBuffer buffer)
Draws a line consisting of hyphens.

Parameters:
length - The number of hyphens to print.
buffer - The buffer to write the hyphens to.


Copyright © 2005-2011 ELCA. All Rights Reserved.