hmi.xml
Class XMLScanException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by hmi.xml.XMLScanException
All Implemented Interfaces:
Serializable

public class XMLScanException
extends RuntimeException

XMLScanException is a RuntimeException that is thrown when a XML input that is not lexically well-formed is scanned, or if an unexpected End-Of-Data is reached.

Author:
Job Zwiers
See Also:
Serialized Form

Field Summary
private  int charPos
           
private  String currentTokenString
           
private  String file
           
private  int line
           
private static long serialVersionUID
           
private  int tokenCharPos
           
private  int tokenLine
           
private  String url
           
 
Constructor Summary
XMLScanException()
          default constructor for XMLScanExceptions.
XMLScanException(String s)
          XMLScanExceptions with a String text attribute.
XMLScanException(String s, String file, String url, int tokenLine, int tokenCharPos, int line, int charPos)
          XMLScanExceptions with a String text attribute.
 
Method Summary
 String currentTokenString()
           
 int getCharPos()
          returns the current character position within the current line. character counts start at 1 for the first character within the line.
 String getFile()
           
 int getLine()
          returns the current line number; line counts start at 1.
 int getTokenCharPos()
          returns the character position of the start of the current token.
 int getTokenLine()
          returns the starting line number of the start of the the current token. line counting starts at 1.
 String getUrl()
           
 String toString()
          produces the error message
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

line

private int line

tokenLine

private int tokenLine

charPos

private int charPos

tokenCharPos

private int tokenCharPos

currentTokenString

private String currentTokenString

url

private String url

file

private String file

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

XMLScanException

public XMLScanException()
default constructor for XMLScanExceptions.


XMLScanException

public XMLScanException(String s)
XMLScanExceptions with a String text attribute.


XMLScanException

public XMLScanException(String s,
                        String file,
                        String url,
                        int tokenLine,
                        int tokenCharPos,
                        int line,
                        int charPos)
XMLScanExceptions with a String text attribute.

Method Detail

toString

public String toString()
produces the error message

Overrides:
toString in class Throwable

getLine

public final int getLine()
returns the current line number; line counts start at 1.


getCharPos

public final int getCharPos()
returns the current character position within the current line. character counts start at 1 for the first character within the line. After a \n character, the character position is 0.


getTokenLine

public final int getTokenLine()
returns the starting line number of the start of the the current token. line counting starts at 1.


getTokenCharPos

public final int getTokenCharPos()
returns the character position of the start of the current token.


currentTokenString

public final String currentTokenString()

getUrl

public String getUrl()

getFile

public String getFile()