Regain 2.1.0-STABLE API

net.sf.regain
Class RegainException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.sf.regain.RegainException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HttpStreamException, RedirectException, RedirectException

public class RegainException
extends Exception

An exception for the lucene search.

It can handle nested exceptions. Nested exceptions will be printed with the stacktrace.

This class has the same code as ExtendedJspException. The only difference is, that is inherits from Exception.

Author:
Til Schneider, www.murfman.de
See Also:
Serialized Form

Field Summary
private  Throwable mCause
          The nested exception.
(package private) static long serialVersionUID
           
 
Constructor Summary
RegainException(String message)
          Creates a new instance of SearchException.
RegainException(String message, Throwable cause)
          Creates a new instance of SearchException.
 
Method Summary
 Throwable getCause()
          Gets the cause of this exception.
 void printStackTrace(PrintStream stream)
          Prints the stack trace of this exception an of the nested exception, if present.
 void printStackTrace(PrintWriter writer)
          Prints the stack trace of this exception an of the nested exception, if present.
private  boolean superClassPrintsCause()
          Gets whether the superclass is able to print the cause of the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

mCause

private Throwable mCause
The nested exception. May be null.

Constructor Detail

RegainException

public RegainException(String message)
Creates a new instance of SearchException.

Parameters:
message - The error message

RegainException

public RegainException(String message,
                       Throwable cause)
Creates a new instance of SearchException.

Parameters:
message - The error message
cause - The nested exception.
Method Detail

getCause

public Throwable getCause()
Gets the cause of this exception. (May be null)

Overrides:
getCause in class Throwable
Returns:
The cause of this exception.

printStackTrace

public void printStackTrace(PrintStream stream)
Prints the stack trace of this exception an of the nested exception, if present.

Overrides:
printStackTrace in class Throwable
Parameters:
stream - The stream to print to.

printStackTrace

public void printStackTrace(PrintWriter writer)
Prints the stack trace of this exception an of the nested exception, if present.

Overrides:
printStackTrace in class Throwable
Parameters:
writer - The writer to print to.

superClassPrintsCause

private boolean superClassPrintsCause()
Gets whether the superclass is able to print the cause of the exception. This is true for Java 1.4 and above.

Returns:
Whether the superclass is able to print the cause of the exception.

Regain 2.1.0-STABLE API

Regain 2.1.0-STABLE, Copyright (C) 2004-2010 Til Schneider, www.murfman.de, Thomas Tesche, www.clustersystems.info