org.jrdf.parser
Class ParseException

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

public class ParseException
extends Exception

A parse exception that can be thrown by a parser when it encounters an error from which it cannot or doesn't want to recover.

See Also:
Serialized Form

Constructor Summary
ParseException(Exception source, int lineNo, int columnNo)
          Creates a new ParseException wrapping another exception.
ParseException(String msg, Exception source, int lineNo, int columnNo)
          Creates a new ParseException wrapping another exception.
ParseException(String msg, int lineNo, int columnNo)
          Creates a new ParseException.
 
Method Summary
 int getColumnNumber()
          Gets the column number associated with this parse exception.
 int getLineNumber()
          Gets the line number associated with this parse exception.
 void printStackTrace()
           
 void printStackTrace(PrintStream ps)
           
 void printStackTrace(PrintWriter pw)
           
 
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

ParseException

public ParseException(String msg,
                      int lineNo,
                      int columnNo)
Creates a new ParseException.

Parameters:
msg - An error message.
lineNo - A line number associated with the message.
columnNo - A column number associated with the message.

ParseException

public ParseException(String msg,
                      Exception source,
                      int lineNo,
                      int columnNo)
Creates a new ParseException wrapping another exception.

Parameters:
msg - An error message.
source - The source exception.
lineNo - A line number associated with the message.
columnNo - A column number associated with the message.

ParseException

public ParseException(Exception source,
                      int lineNo,
                      int columnNo)
Creates a new ParseException wrapping another exception. The ParseException will inherit its message from the supplied source exception.

Parameters:
source - The source exception.
lineNo - A line number associated with the message.
columnNo - A column number associated with the message.
Method Detail

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(PrintStream ps)

printStackTrace

public void printStackTrace(PrintWriter pw)

getLineNumber

public int getLineNumber()
Gets the line number associated with this parse exception.

Returns:
A line number, or -1 if no line number is available or applicable.

getColumnNumber

public int getColumnNumber()
Gets the column number associated with this parse exception.

Returns:
A column number, or -1 if no column number is available or applicable.