Package net.sourceforge.nanoxml
Class XMLParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.sourceforge.nanoxml.XMLParseException
- All Implemented Interfaces:
Serializable
An XMLParseException is thrown when an error occures while parsing an XML
string.
$Revision: 1.1 $
$Date: 2002/08/03 04:05:32 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Indicates that no line number has been associated with this exception. -
Constructor Summary
ConstructorsConstructorDescriptionXMLParseException
(String name, int lineNr, String message) Creates an exception.XMLParseException
(String name, String message) Creates an exception. -
Method Summary
Modifier and TypeMethodDescriptionint
Where the error occurred, orNO_LINE
if the line number is unknown.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
NO_LINE
public static final int NO_LINEIndicates that no line number has been associated with this exception.- See Also:
-
-
Constructor Details
-
XMLParseException
Creates an exception.- Parameters:
name
- The name of the element where the error is located.message
- A message describing what went wrong.- Preconditions:
-
message != null
- Postconditions:
-
getLineNr() => NO_LINE
-
XMLParseException
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:
-
message != null
lineNr > 0
- Postconditions:
-
getLineNr() => lineNr
-
-
Method Details
-
getLineNr
public int getLineNr()Where the error occurred, orNO_LINE
if the line number is unknown.- Returns:
- line in source where exception occurred
- See Also:
-