uxparser
Class XException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by uxparser.XException
All Implemented Interfaces:
java.io.Serializable

public class XException
extends java.lang.RuntimeException

XException is used to indicate a problem parsing XML.

See Also:
Serialized Form

Constructor Summary
XException()
          Default constructor.
XException(java.lang.String msg)
          Construct with no line number.
XException(java.lang.String msg, int line)
          Construct using specified line number.
XException(java.lang.String msg, int line, int column)
          Construct using specified line and column.
XException(java.lang.String msg, int line, int column, java.lang.Throwable cause)
          Construct using specified line and column.
XException(java.lang.String msg, int line, java.lang.Throwable cause)
          Construct using specified line number.
XException(java.lang.String msg, java.lang.Throwable cause)
          Construct with no line number.
XException(java.lang.String msg, XElem elem)
          Construct using element's line number.
XException(java.lang.String msg, XElem elem, java.lang.Throwable cause)
          Construct using element's line number.
XException(java.lang.String msg, XParser parser)
          Construct using current line and column of parser.
XException(java.lang.String msg, XParser parser, java.lang.Throwable cause)
          Construct using current line and column of parser.
XException(java.lang.Throwable cause)
          Constructor with cause only.
 
Method Summary
 int column()
          Get the column number of 0 if unknown.
static java.lang.String format(java.lang.String msg, int line, int col)
          Get the standard message format given a text message and a line/column location.
 java.lang.Throwable getCause()
          Get the nested exception for or return null if no cause exception is provided.
 XElem getElem()
          Return the XElem passed to the constructor or null.
 int line()
          Get the line number of 0 if unknown.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, 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
 

Constructor Detail

XException

public XException(java.lang.String msg,
                  int line,
                  int column,
                  java.lang.Throwable cause)
Construct using specified line and column.


XException

public XException(java.lang.String msg,
                  int line,
                  int column)
Construct using specified line and column.


XException

public XException(java.lang.String msg,
                  int line,
                  java.lang.Throwable cause)
Construct using specified line number.


XException

public XException(java.lang.String msg,
                  int line)
Construct using specified line number.


XException

public XException(java.lang.String msg,
                  XParser parser,
                  java.lang.Throwable cause)
Construct using current line and column of parser.


XException

public XException(java.lang.String msg,
                  XParser parser)
Construct using current line and column of parser.


XException

public XException(java.lang.String msg,
                  XElem elem,
                  java.lang.Throwable cause)
Construct using element's line number.


XException

public XException(java.lang.String msg,
                  XElem elem)
Construct using element's line number.


XException

public XException(java.lang.String msg,
                  java.lang.Throwable cause)
Construct with no line number.


XException

public XException(java.lang.String msg)
Construct with no line number.


XException

public XException(java.lang.Throwable cause)
Constructor with cause only.


XException

public XException()
Default constructor.

Method Detail

line

public int line()
Get the line number of 0 if unknown.


column

public int column()
Get the column number of 0 if unknown.


getElem

public XElem getElem()
Return the XElem passed to the constructor or null.


getCause

public java.lang.Throwable getCause()
Get the nested exception for or return null if no cause exception is provided.

Overrides:
getCause in class java.lang.Throwable

format

public static java.lang.String format(java.lang.String msg,
                                      int line,
                                      int col)
Get the standard message format given a text message and a line/column location.

Parameters:
msg - base message
line - 0 if unknown
col - 0 if unknown