Package org.plumelib.util
Class FileIOException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.plumelib.util.FileIOException
- All Implemented Interfaces:
Serializable
This class extends IOException by also reporting a file name and line number at which the
exception occurred. It requires use of a
LineNumberReader.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @Nullable StringThe file being read when the IOException occurred.final intThe line being read when the IOException occurred. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a dummy FileIOException.FileIOException(@Nullable LineNumberReader reader, File file, @Nullable Throwable cause) Create a FileIOException.FileIOException(@Nullable LineNumberReader reader, @Nullable String fileName, @Nullable Throwable cause) Create a FileIOException.FileIOException(@Nullable LineNumberReader reader, @Nullable Throwable cause) Create a FileIOException.FileIOException(@Nullable String message) Create a FileIOException with no known file name or line number (which is kind of pointless; you might as well just have a regular exception).FileIOException(@Nullable String message, @Nullable LineNumberReader reader) Create a FileIOException.FileIOException(@Nullable String message, @Nullable LineNumberReader reader, File file) Create a FileIOException.FileIOException(@Nullable String message, @Nullable LineNumberReader reader, File file, @Nullable Throwable cause) Create a FileIOException.FileIOException(@Nullable String message, @Nullable LineNumberReader reader, @Nullable String fileName) Create a FileIOException.FileIOException(@Nullable String message, @Nullable LineNumberReader reader, @Nullable String fileName, @Nullable Throwable cause) Create a FileIOException.FileIOException(@Nullable String message, @Nullable LineNumberReader reader, @Nullable Throwable cause) Create a FileIOException.FileIOException(@Nullable String message, @Nullable String fileName, int lineNumber) Create a FileIOException.FileIOException(@Nullable String message, @Nullable Throwable cause) Create a FileIOException.FileIOException(@Nullable String message, @Nullable Throwable cause, @Nullable String fileName, int lineNumber) Create a FileIOException.FileIOException(@Nullable Throwable cause) Create a FileIOException. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
fileName
The file being read when the IOException occurred. -
lineNumber
public final int lineNumberThe line being read when the IOException occurred.
-
-
Constructor Details
-
FileIOException
public FileIOException()Create a dummy FileIOException. -
FileIOException
Create a FileIOException.- Parameters:
cause- the exception that occurred
-
FileIOException
Create a FileIOException with no known file name or line number (which is kind of pointless; you might as well just have a regular exception).- Parameters:
message- the detail message
-
FileIOException
Create a FileIOException.- Parameters:
message- the detail message for the exceptioncause- the exception that occurred
-
FileIOException
Create a FileIOException.- Parameters:
message- the detail message for the exceptionfileName- the name of the file being readlineNumber- the line number to which the file has been read
-
FileIOException
public FileIOException(@Nullable String message, @Nullable Throwable cause, @Nullable String fileName, int lineNumber) Create a FileIOException.- Parameters:
message- the detail message for the exceptioncause- the exception that occurredfileName- the name of the file being readlineNumber- the line number to which the file has been read
-
FileIOException
Create a FileIOException.- Parameters:
reader- the reader for the file being read (used for the line number only; no file name is known)cause- the exception that occurred
-
FileIOException
Create a FileIOException.- Parameters:
message- the detail message for the exceptionreader- indicates the line number at which the exception occurred; there is no known file name
-
FileIOException
public FileIOException(@Nullable String message, @Nullable LineNumberReader reader, @Nullable Throwable cause) Create a FileIOException.- Parameters:
message- the detail message for the exceptionreader- the reader for the file being readcause- the exception that occurred
-
FileIOException
public FileIOException(@Nullable String message, @Nullable LineNumberReader reader, @Nullable String fileName) Create a FileIOException.- Parameters:
message- the detail message for the exceptionreader- the reader for the file being read (used for the line number only)fileName- the name of the file being read
-
FileIOException
public FileIOException(@Nullable LineNumberReader reader, @Nullable String fileName, @Nullable Throwable cause) Create a FileIOException.- Parameters:
reader- the reader for the file being read (used for the line number only)fileName- the name of the file being readcause- the exception that occurred
-
FileIOException
public FileIOException(@Nullable String message, @Nullable LineNumberReader reader, @Nullable String fileName, @Nullable Throwable cause) Create a FileIOException.- Parameters:
message- the detail message for the exceptionreader- the reader for the file being read (used for the line number only)fileName- the name of the file being readcause- the exception that occurred
-
FileIOException
Create a FileIOException.- Parameters:
message- the detail message for the exceptionreader- the reader for the file being read (used for the line number only)file- the file being read (used for its name only)
-
FileIOException
public FileIOException(@Nullable String message, @Nullable LineNumberReader reader, File file, @Nullable Throwable cause) Create a FileIOException.- Parameters:
message- the detail message for the exceptionreader- the reader for the file being read (used for the line number only)file- the file being read (used for its name only)cause- the exception that occurred
-
FileIOException
Create a FileIOException.- Parameters:
reader- the reader for the file being read (used for the line number only)file- the file being read (used for its name only)cause- the exception that occurred
-
-
Method Details
-
getMessage
- Overrides:
getMessagein classThrowable
-