nanoxml
Class XMLParseException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended bynanoxml.XMLParseException
All Implemented Interfaces:
Serializable

public class XMLParseException
extends RuntimeException

An XMLParseException is thrown when an error occures while parsing an XML string.

$Revision: 1.1 $
$Date: 2005/07/20 13:21:23 $

Version:
$Name: $, $Revision: 1.1 $
Author:
Marc De Scheemaecker
See Also:
XMLElement, Serialized Form

Field Summary
static int NO_LINE
          Indicates that no line number has been associated with this exception.
 
Constructor Summary
XMLParseException(String name, int lineNr, String message)
          Creates an exception.
XMLParseException(String name, String message)
          Creates an exception.
 
Method Summary
 int getLineNr()
          Where the error occurred, or NO_LINE if the line number is unknown.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_LINE

public static final int NO_LINE
Indicates that no line number has been associated with this exception.

See Also:
Constant Field Values
Constructor Detail

XMLParseException

public XMLParseException(String name,
                         String message)
Creates an exception.

Parameters:
name - The name of the element where the error is located.
message - A message describing what went wrong.
Preconditions:
Postconditions:

XMLParseException

public XMLParseException(String name,
                         int lineNr,
                         String message)
Creates an exception.

Parameters:
name - The name of the element where the error is located.
lineNr - The number of the line in the input.
message - A message describing what went wrong.
Preconditions:
Postconditions:
Method Detail

getLineNr

public int getLineNr()
Where the error occurred, or NO_LINE if the line number is unknown.

See Also:
NO_LINE