Class FileParseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.sm.smtools.exceptions.FileParseException
All Implemented Interfaces:
Serializable

public final class FileParseException extends Exception
Indicates that an attempt to parse a line in the file denoted by the specified filename has failed.

Note that this class cannot be subclassed!

Version:
08/04/2013
Author:
Sven Maerivoet
See Also:
  • Constructor Details

    • FileParseException

      public FileParseException(String filename, String value, int lineNr)
      Constructs a FileParseException object, based on the specified filename, the incorrect value that was read and the number of the line at which the parse error occurred.
      Parameters:
      filename - the name of the file this exception corresponds to
      value - the incorrect value that was read
      lineNr - the number of the line at which the parse error occurred
      See Also:
    • FileParseException

      public FileParseException(String filename, String value)
      Constructs a FileParseException object, based on the specified filename and the incorrect value that was read.
      Parameters:
      filename - the name of the file this exception corresponds to
      value - the incorrect value that was read
      See Also:
    • FileParseException

      public FileParseException(String value, int lineNr)
      Constructs a FileParseException, based on the incorrect value that was read and the number of the line at which the parse error occurred.
      Parameters:
      value - the incorrect value that was read
      lineNr - the number of the line at which the parse error occurred
      See Also:
  • Method Details

    • getFilename

      public String getFilename()
      Returns the name of the file this exception corresponds to.
      Returns:
      the name of the file this exception corresponds to
    • getValue

      public String getValue()
      Returns the incorrect value that was read.
      Returns:
      the incorrect value that was read
    • getLineNr

      public int getLineNr()
      Returns the number of the line at which the parse error occurred.
      Returns:
      the number of the line at which the parse error occurred