net.sf.jabb.util.ex
Class LoggedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.sf.jabb.util.ex.LoggedException
All Implemented Interfaces:
Serializable

public class LoggedException
extends Exception

The exception that had been logged by commons-logging.

Author:
James Hu
See Also:
Serialized Form

Field Summary
static int DEBUG
           
static int ERROR
           
static int FATAL
           
static int INFO
           
static int TRACE
           
static int WARN
           
 
Constructor Summary
LoggedException(org.apache.commons.logging.Log log, int level, String message, Throwable cause)
          Create a new instance, and at the same time, ensure the original exception is logged.
LoggedException(org.apache.commons.logging.Log log, String message, Throwable cause)
          Create a new instance, and at the same time, ensure the original exception is logged as error.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRACE

public static final int TRACE
See Also:
Constant Field Values

DEBUG

public static final int DEBUG
See Also:
Constant Field Values

WARN

public static final int WARN
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

FATAL

public static final int FATAL
See Also:
Constant Field Values

INFO

public static final int INFO
See Also:
Constant Field Values
Constructor Detail

LoggedException

public LoggedException(org.apache.commons.logging.Log log,
                       int level,
                       String message,
                       Throwable cause)
Create a new instance, and at the same time, ensure the original exception is logged.

Parameters:
log - the log utility
level - level of the log
message - description
cause - the original exception. If it is of type LoggedException, then the newly created instance is a clone of itself.

LoggedException

public LoggedException(org.apache.commons.logging.Log log,
                       String message,
                       Throwable cause)
Create a new instance, and at the same time, ensure the original exception is logged as error.

Parameters:
log - the log utility
message - description
cause - the original exception. If it is of type LoggedException, then the newly created instance is a clone of itself.


Copyright © 2012. All Rights Reserved.