Hilbert II - Version 0.03.04

org.qedeq.kernel.common
Class XmlFileException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.qedeq.kernel.common.XmlFileException
All Implemented Interfaces:
Serializable

public final class XmlFileException
extends Exception

Data validation error. Occurs if a set or add method leads to wrong or inconsistent data.

Version:
$Revision: 1.1 $
See Also:
Serialized Form

Constructor Summary
XmlFileException(Exception exception)
          Constructor.
XmlFileException(File file, Exception exception)
          Constructor.
XmlFileException(IOException exception)
          Constructor.
XmlFileException(QedeqException exception, SourceArea errorArea, SourceArea referenceArea)
          Constructor.
XmlFileException(SAXException exception)
          Constructor.
XmlFileException(SyntaxException exception)
          Constructor.
XmlFileException(URL url, Exception exception)
          Constructor.
 
Method Summary
 String getDescription()
          Get detailed error description.
 int getErrorCode()
          Get error code.
 String getLine()
          Get line that is referenced by getSourceArea().
 String getMessage()
           
 SourceArea getReferenceArea()
          Get additional position information about another associated location.
 SourceArea getSourceArea()
          Get position information about error location.
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlFileException

public XmlFileException(QedeqException exception,
                        SourceArea errorArea,
                        SourceArea referenceArea)
Constructor.

Parameters:
exception - Exception to wrap.
errorArea - Error location.
referenceArea - Error reference location.

XmlFileException

public XmlFileException(SyntaxException exception)
Constructor.

Parameters:
exception - Exception to wrap.

XmlFileException

public XmlFileException(URL url,
                        Exception exception)
Constructor.

Parameters:
url - Parsed file.
exception - Exception to wrap.

XmlFileException

public XmlFileException(File file,
                        Exception exception)
Constructor.

Parameters:
file - Parsed file.
exception - Exception to wrap.

XmlFileException

public XmlFileException(Exception exception)
Constructor.

Parameters:
exception - Exception to wrap.

XmlFileException

public XmlFileException(IOException exception)
Constructor.

Parameters:
exception - Exception to wrap.

XmlFileException

public XmlFileException(SAXException exception)
Constructor.

Parameters:
exception - Exception to wrap.
Method Detail

getSourceArea

public final SourceArea getSourceArea()
Get position information about error location.

Returns:
Error location position.

getReferenceArea

public final SourceArea getReferenceArea()
Get additional position information about another associated location.

Returns:
Additional error location position.

getErrorCode

public final int getErrorCode()
Get error code.

Returns:
Error code.

getLine

public final String getLine()
Get line that is referenced by getSourceArea().

Returns:
Referenced line.

getMessage

public final String getMessage()

getDescription

public final String getDescription()
Get detailed error description. The first line contains getErrorCode() and getMessage(). The second line contains the local address, the line and column. Third line is the result or getLine(). In the fourth line the row position for the third line is marked.

TODO mime 20070219: rework description: add end (and perhaps reference) information

Returns:
Error description.

toString

public final String toString()

Hilbert II - Version 0.03.04

©left GNU General Public Licence
All Rights Reserved.