Hilbert II - Version 0.03.08

org.qedeq.kernel.common
Class SourceFileException

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

public class SourceFileException
extends QedeqException

Data validation error. Shows an error within a source file.

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

Constructor Summary
SourceFileException(Exception exception)
          Constructor.
SourceFileException(File file, Exception exception)
          Constructor.
SourceFileException(int errorCode, String errorText, Throwable exception, SourceArea errorArea, SourceArea referenceArea)
          Constructor.
SourceFileException(IOException exception)
          Constructor.
SourceFileException(QedeqException exception, SourceArea errorArea, SourceArea referenceArea)
          Constructor.
SourceFileException(SAXException exception)
          Constructor.
SourceFileException(Throwable exception)
          Constructor.
SourceFileException(URL url, Exception exception)
          Constructor.
 
Method Summary
 String getDescription(File localAddress)
          Get detailed error description.
 String getLine(File localAddress)
          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 org.qedeq.kernel.common.QedeqException
getErrorCode
 
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

SourceFileException

public SourceFileException(int errorCode,
                           String errorText,
                           Throwable exception,
                           SourceArea errorArea,
                           SourceArea referenceArea)
Constructor.

Parameters:
errorCode - Error code.
errorText - Error text.
exception - Exception to wrap.
errorArea - Error location.
referenceArea - Error reference location.

SourceFileException

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

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

SourceFileException

public SourceFileException(URL url,
                           Exception exception)
Constructor.

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

SourceFileException

public SourceFileException(File file,
                           Exception exception)
Constructor.

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

SourceFileException

public SourceFileException(Exception exception)
Constructor.

Parameters:
exception - Exception to wrap.

SourceFileException

public SourceFileException(Throwable exception)
Constructor.

Parameters:
exception - Exception to wrap.

SourceFileException

public SourceFileException(IOException exception)
Constructor.

Parameters:
exception - Exception to wrap.

SourceFileException

public SourceFileException(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.

getLine

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

Parameters:
localAddress - Source file for getting the line.
Returns:
Referenced line.

getMessage

public final String getMessage()

getDescription

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

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

TODO mime 20071128: move this method into another class!!!

Parameters:
localAddress - Lookup source here.
Returns:
Error description.

toString

public final String toString()

Hilbert II - Version 0.03.08

©left GNU General Public Licence
All Rights Reserved.