sofya.base.exceptions
Class LocatableFileException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by sofya.base.exceptions.BadFileFormatException
                  extended by sofya.base.exceptions.LocatableFileException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DataTypeException, EOLException

public class LocatableFileException
extends BadFileFormatException

Exception that indicates that a format error was encountered during the reading of a database file that can be traced to a specific location in that file.

Version:
11/04/2004
Author:
Alex Kinneer
See Also:
Serialized Form

Constructor Summary
LocatableFileException(int lineNum)
          Creates a new locatable file exception.
LocatableFileException(java.lang.String msg, int lineNum)
          Creates a new locatable file exception with a message.
 
Method Summary
 int getLineNumber()
          Gets the line number at which the format error was encountered.
 java.lang.String getMessage()
          Displays the message associated with this exception.
 java.lang.String toString()
          Converts this exception to string representation.
 
Methods inherited from class sofya.base.exceptions.BadFileFormatException
getCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, 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

LocatableFileException

public LocatableFileException(int lineNum)
Creates a new locatable file exception.

Parameters:
lineNum - Line at which the format error occurred.

LocatableFileException

public LocatableFileException(java.lang.String msg,
                              int lineNum)
Creates a new locatable file exception with a message.

Parameters:
msg - Message associated with this exception.
lineNum - Line at which the format error occurred.
Method Detail

getLineNumber

public int getLineNumber()
Gets the line number at which the format error was encountered.

Returns:
The line number of the badly formatted line.

getMessage

public java.lang.String getMessage()
Displays the message associated with this exception.

Overrides:
getMessage in class java.lang.Throwable
Returns:
The message associated with this exception.

toString

public java.lang.String toString()
Converts this exception to string representation.

Overrides:
toString in class java.lang.Throwable
Returns:
The string representation of this exception.