diff options
Diffstat (limited to 'netx/net/sourceforge/nanoxml/XMLParseException.java')
-rw-r--r-- | netx/net/sourceforge/nanoxml/XMLParseException.java | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/netx/net/sourceforge/nanoxml/XMLParseException.java b/netx/net/sourceforge/nanoxml/XMLParseException.java index dfbb637..329dea4 100644 --- a/netx/net/sourceforge/nanoxml/XMLParseException.java +++ b/netx/net/sourceforge/nanoxml/XMLParseException.java @@ -26,10 +26,8 @@ * 3. This notice may not be removed or altered from any source distribution. *****************************************************************************/ - package net.sourceforge.nanoxml; - /** * An XMLParseException is thrown when an error occures while parsing an XML * string. @@ -43,15 +41,13 @@ package net.sourceforge.nanoxml; * @version $Name: $, $Revision: 1.1 $ */ public class XMLParseException - extends RuntimeException -{ + extends RuntimeException { /** * Indicates that no line number has been associated with this exception. */ public static final int NO_LINE = -1; - /** * The line number in the source code where the error occurred, or * <code>NO_LINE</code> if the line number is unknown. @@ -62,7 +58,6 @@ public class XMLParseException */ private int lineNr; - /** * Creates an exception. * @@ -78,16 +73,14 @@ public class XMLParseException * </ul></dd></dl><dl> */ public XMLParseException(String name, - String message) - { + String message) { super("XML Parse Exception during parsing of " - + ((name == null) ? "the XML definition" + + ((name == null) ? "the XML definition" : ("a " + name + " element")) - + ": " + message); + + ": " + message); this.lineNr = XMLParseException.NO_LINE; } - /** * Creates an exception. * @@ -105,25 +98,22 @@ public class XMLParseException * </ul></dd></dl><dl> */ public XMLParseException(String name, - int lineNr, - String message) - { + int lineNr, + String message) { super("XML Parse Exception during parsing of " - + ((name == null) ? "the XML definition" + + ((name == null) ? "the XML definition" : ("a " + name + " element")) - + " at line " + lineNr + ": " + message); + + " at line " + lineNr + ": " + message); this.lineNr = lineNr; } - /** * Where the error occurred, or <code>NO_LINE</code> if the line number is * unknown. * * @see net.sourceforge.nanoxml.XMLParseException#NO_LINE */ - public int getLineNr() - { + public int getLineNr() { return this.lineNr; } |