uk.ac.ebi.intact.application.editor.exception
Class BaseException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--uk.ac.ebi.intact.application.editor.exception.BaseException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EmptyTopicsException, SearchException, SessionExpiredException, ValidationException

public class BaseException
extends java.lang.Exception

This is the common superclass for all application.exception; This class and its subclasses support the chained exception facility.

Version:
$Id: BaseException.java,v 1.2 2003/05/23 15:40:53 smudali Exp $
Author:
Sugath Mudali (smudali@ebi.ac.uk)
See Also:
Serialized Form

Constructor Summary
BaseException()
          Default constructor.
BaseException(java.lang.String msg)
          Constructor with a message.
BaseException(java.lang.Throwable cause)
          Constructor that takes a root exception.
 
Method Summary
 java.lang.String[] getMessageArgs()
          Returns an array of arguments to pass to place holders application resources file.
 java.lang.String getMessageKey()
          Returns the message key
 java.lang.Throwable getRootCause()
          Return the root exception, if one exists.
 void printStackTrace()
          Print both the normal and root stack traces to the std err.
 void printStackTrace(java.io.PrintStream out)
          Print both the normal and root stack traces.
 void printStackTrace(java.io.PrintWriter writer)
          Print both the normal and root stack traces.
 void setMessageArgs(java.lang.String[] args)
          The arguments to pass to place holders in the application resources file.
 void setMessageKey(java.lang.String key)
          Sets the message key.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseException

public BaseException()
Default constructor.


BaseException

public BaseException(java.lang.String msg)
Constructor with a message.

Parameters:
msg - the message explaing the exception.

BaseException

public BaseException(java.lang.Throwable cause)
Constructor that takes a root exception.

Parameters:
cause - the root exception.
Method Detail

printStackTrace

public void printStackTrace(java.io.PrintWriter writer)
Print both the normal and root stack traces.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
writer - the writer to print the stack trace.

printStackTrace

public void printStackTrace(java.io.PrintStream out)
Print both the normal and root stack traces.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
out - the output stream.

printStackTrace

public void printStackTrace()
Print both the normal and root stack traces to the std err.

Overrides:
printStackTrace in class java.lang.Throwable

getRootCause

public java.lang.Throwable getRootCause()
Return the root exception, if one exists.

Returns:
the root exception if it exists or else null.

setMessageKey

public void setMessageKey(java.lang.String key)
Sets the message key.

Parameters:
key - the key to search in the application resources file.

getMessageKey

public java.lang.String getMessageKey()
Returns the message key

Returns:
the key to search in the application resources file.

setMessageArgs

public void setMessageArgs(java.lang.String[] args)
The arguments to pass to place holders in the application resources file.

Parameters:
args - an array of arguments to pass to place holders.

getMessageArgs

public java.lang.String[] getMessageArgs()
Returns an array of arguments to pass to place holders application resources file.

Returns:
an array of String arguments to pass to place holders.


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk