Version: 3.5.0

org.generationcp.core
Class GCPException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.generationcp.core.GCPException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TransformationParameterException

public class GCPException
extends java.lang.Exception

A general exception which can be used as a wrapper around other exceptions. Using this exception simplifies the code (but on the other hand it makes it less "type-safe" - which is usually not a problem when dealing with exceptions).

Version:
$Id: GCPException.html 19678 2010-07-23 23:41:44Z jbmorales $
Author:
Martin Senger
See Also:
Serialized Form

Constructor Summary
GCPException()
          Constructs a new exception with null as its detail message.
GCPException(java.lang.String s)
          Constructs a new exception with the specified detail message.
GCPException(java.lang.String s, java.lang.Throwable cause)
          Constructs a new exception with the specified detail message and cause.
 
Method Summary
static void formatAndLog(java.lang.Throwable e, org.apache.commons.logging.Log otherLog)
          Format given exception 'e' depending on how serious it it.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GCPException

public GCPException()
Constructs a new exception with null as its detail message. The cause is not initialized.


GCPException

public GCPException(java.lang.String s)
Constructs a new exception with the specified detail message. The cause is not initialized.

Parameters:
s - message/reason

GCPException

public GCPException(java.lang.String s,
                    java.lang.Throwable cause)
Constructs a new exception with the specified detail message and cause.

Parameters:
s - message (or reason of)
cause - the cause, null value is permitted
Method Detail

formatAndLog

public static void formatAndLog(java.lang.Throwable e,
                                org.apache.commons.logging.Log otherLog)
Format given exception 'e' depending on how serious it it. In same cases add stack trace. Log the result in the given 'log'.

Parameters:
e - an exception to be formatted and logged
otherLog - where to log it

Version: 3.5.0

Submit a bug or feature
Generated: Fri Jul 23 18:24:48 CDT 2010