Package org.sm.smtools.exceptions
Class FileParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.sm.smtools.exceptions.FileParseException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorDescriptionFileParseException
(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
(String filename, String value) Constructs aFileParseException
object, based on the specified filename and the incorrect value that was read.FileParseException
(String filename, 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 TypeMethodDescriptionReturns the name of the file this exception corresponds to.int
Returns the number of the line at which the parse error occurred.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
-
Constructor Details
-
FileParseException
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:
-
FileParseException
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:
-
FileParseException
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:
-
-
Method Details
-
getFilename
Returns the name of the file this exception corresponds to.- Returns:
- the name of the file this exception corresponds to
-
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
-