Package org.sm.smtools.exceptions
Class FileParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.sm.smtools.exceptions.FileParseException
- All Implemented Interfaces:
java.io.Serializable
public final class FileParseException
extends java.lang.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:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description FileParseException(java.lang.String value, int lineNr)
Constructs aFileParseException
, based on the incorrect value that was read and the number of the line at which the parse error occurred.FileParseException(java.lang.String filename, java.lang.String value)
Constructs aFileParseException
object, based on the specified filename and the incorrect value that was read.FileParseException(java.lang.String filename, java.lang.String value, int lineNr)
Constructs aFileParseException
object, based on the specified filename, the incorrect value that was read and the number of the line at which the parse error occurred. -
Method Summary
Modifier and Type Method Description java.lang.String
getFilename()
Returns the name of the file this exception corresponds to.int
getLineNr()
Returns the number of the line at which the parse error occurred.java.lang.String
getValue()
Returns the incorrect value that was read.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
FileParseException
public FileParseException(java.lang.String filename, java.lang.String value, int lineNr)Constructs aFileParseException
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 tovalue
- the incorrect value that was readlineNr
- the number of the line at which the parse error occurred- See Also:
TextFileParser
-
FileParseException
public FileParseException(java.lang.String filename, java.lang.String value)Constructs aFileParseException
object, based on the specified filename and the incorrect value that was read.- Parameters:
filename
- the name of the file this exception corresponds tovalue
- the incorrect value that was read- See Also:
TextFileParser
-
FileParseException
public FileParseException(java.lang.String value, int lineNr)Constructs aFileParseException
, 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 readlineNr
- the number of the line at which the parse error occurred- See Also:
TextFileParser
-
-
Method Details
-
getFilename
public java.lang.String getFilename()Returns the name of the file this exception corresponds to.- Returns:
- the name of the file this exception corresponds to
-
getValue
public java.lang.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
-