uk.ac.bham.gloss
Class GlossException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by uk.ac.bham.gloss.GlossException
All Implemented Interfaces:
java.io.Serializable, Locator

public class GlossException
extends java.lang.Exception
implements Locator

Exception class for the gloss package. Copyright Richard Kaye 2007-8 for GLOSS, http://gloss.bham.ac.uk Usage permitted according to the GPL. No waranty.

See Also:
Serialized Form

Constructor Summary
GlossException(java.lang.String message)
          Raise an exception with given message.
GlossException(java.lang.String message, Locator l)
          Raise an exception with given message and locator.
GlossException(java.lang.String message, Mode m)
          Raise an exception with given message, when executing a mode.
GlossException(java.lang.String message, Token t)
          Raise an exception with given message and token.
 
Method Summary
 int col()
          Get the column number (starting from 0) of the position in the document raising this exception, or -1 if this data is not known or not available.
 java.lang.String doc()
          Get the filename or url of the document raising this exception, or null if this data is not known or not available.
 int line()
          Get the line number (starting from 1) of the position in the document raising this exception, or -1 if this data is not known or not available.
 
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
 

Constructor Detail

GlossException

public GlossException(java.lang.String message)
Raise an exception with given message.


GlossException

public GlossException(java.lang.String message,
                      Locator l)
Raise an exception with given message and locator.


GlossException

public GlossException(java.lang.String message,
                      Token t)
Raise an exception with given message and token.


GlossException

public GlossException(java.lang.String message,
                      Mode m)
Raise an exception with given message, when executing a mode.

Method Detail

doc

public java.lang.String doc()
Get the filename or url of the document raising this exception, or null if this data is not known or not available.

Specified by:
doc in interface Locator

line

public int line()
Get the line number (starting from 1) of the position in the document raising this exception, or -1 if this data is not known or not available.

Specified by:
line in interface Locator

col

public int col()
Get the column number (starting from 0) of the position in the document raising this exception, or -1 if this data is not known or not available.

Specified by:
col in interface Locator