org.jrdf.parser
Class StatementHandlerException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.jrdf.parser.StatementHandlerException
All Implemented Interfaces:
Serializable

public class StatementHandlerException
extends Exception

An exception that can be thrown by a StatementHandler when it encounters an application specific error that should cause the parser to stop. If an exception is associated with the error then this exception can be stored in a StatementHandlerException and can later be retrieved from it when the StatementHandlerException is catched, e.g.:

 try {
   parser.parse(myInputStream, myBaseURI);
 }
 catch (StatementHandlerException e) {
   Exception myException = e.getSource();
   ...
 }
 

See Also:
Serialized Form

Constructor Summary
StatementHandlerException(Exception newSource)
          Creates a new StatementHandlerException wrapping another exception.
StatementHandlerException(String msg)
          Creates a new StatementHandlerException.
StatementHandlerException(String msg, Exception newSource)
          Creates a new StatementHandlerException wrapping another exception.
 
Method Summary
 Throwable getCause()
          Overrides Throwable.getCause() (JDK 1.4 or later).
 Exception getSource()
          Gets the source of this exception.
 void printStackTrace()
           
 void printStackTrace(PrintStream ps)
           
 void printStackTrace(PrintWriter pw)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, 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

StatementHandlerException

public StatementHandlerException(String msg)
Creates a new StatementHandlerException.

Parameters:
msg - An error message.

StatementHandlerException

public StatementHandlerException(String msg,
                                 Exception newSource)
Creates a new StatementHandlerException wrapping another exception.

Parameters:
msg - An error message.
newSource - The newSource exception.

StatementHandlerException

public StatementHandlerException(Exception newSource)
Creates a new StatementHandlerException wrapping another exception. The StatementHandlerException will inherit its message from the supplied newSource exception.

Parameters:
newSource - The newSource exception.
Method Detail

getSource

public Exception getSource()
Gets the source of this exception.

Returns:
The source of this exception.

getCause

public Throwable getCause()
Overrides Throwable.getCause() (JDK 1.4 or later).

Returns:
the source.

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(PrintStream ps)

printStackTrace

public void printStackTrace(PrintWriter pw)