kiwi.text
Class ParsingException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--kiwi.text.ParsingException
All Implemented Interfaces:
java.io.Serializable

public class ParsingException
extends java.lang.Exception

General-purpose parsing exception.

Author:
Mark Lindner, PING Software Group
See Also:
Serialized Form

Field Summary
private  int line
           
private  java.lang.String message
           
 
Fields inherited from class java.lang.Throwable
backtrace, detailMessage, serialVersionUID
 
Constructor Summary
ParsingException(java.lang.String message)
          Construct a new ParsingException.
ParsingException(java.lang.String message, int line)
          Construct a new ParsingException.
 
Method Summary
 int getLine()
          Get the line number of this exception.
 java.lang.String getMessage()
          Get the message of this exception.
 java.lang.String toString()
          Convert the parsing exception to a string that contains the message and line number.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, printStackTrace0
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

line

private int line

message

private java.lang.String message
Constructor Detail

ParsingException

public ParsingException(java.lang.String message)
Construct a new ParsingException.
Parameters:
message - The exception message.

ParsingException

public ParsingException(java.lang.String message,
                        int line)
Construct a new ParsingException.
Parameters:
message - The exception message.
line - The line number in the input where the exception occurred.
Method Detail

getLine

public int getLine()
Get the line number of this exception. If no line number is available, this method returns -1.

getMessage

public java.lang.String getMessage()
Get the message of this exception.
Overrides:
getMessage in class java.lang.Throwable

toString

public java.lang.String toString()
Convert the parsing exception to a string that contains the message and line number.
Overrides:
toString in class java.lang.Throwable