|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
uk.org.blankaspect.nlf.NlfException
public class NlfException
An object of this class signals that an exception has occurred during an operation on a Nested List File.
An exception has an identifier that maps to a detail message, and may include the file on which the
exception occurred and the offset within the file at which it occurred. The exception may also act as a
wrapper for another java.lang.Throwable
, which is known as the cause.
The file, offset and cause are not automatically incorporated into the detail message of an NlfException
, but they can be obtained, along with the exception identifier, by methods of this class or
a superclass.
NlfUncheckedException
,
Serialized FormConstructor Summary | |
---|---|
NlfException(ExceptionId id)
Constructs an NlfException with the specified identifier. |
|
NlfException(ExceptionId id,
java.io.File file)
Constructs an NlfException with the specified identifier and file. |
|
NlfException(ExceptionId id,
java.io.File file,
long offset)
Constructs an NlfException with the specified identifier, file and offset. |
|
NlfException(ExceptionId id,
java.io.File file,
long offset,
java.lang.Throwable cause)
Constructs an NlfException with the specified identifier, file, offset and cause. |
|
NlfException(ExceptionId id,
java.io.File file,
java.lang.Throwable cause)
Constructs an NlfException with the specified identifier, file and cause. |
|
NlfException(ExceptionId id,
java.lang.Throwable cause)
Constructs an NlfException with the specified identifier and cause. |
Method Summary | |
---|---|
java.io.File |
getFile()
Returns the file that is associated with the exception. |
ExceptionId |
getId()
Returns the exception identifier. |
long |
getOffset()
Returns the offset that is associated with the exception, or -1 if the offset is not set to a
legal value. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NlfException(ExceptionId id)
NlfException
with the specified identifier. The identifier maps to a message
that is used as the exception's detail message in the constructor of java.lang.Exception
.
id
- the exception identifier.public NlfException(ExceptionId id, java.lang.Throwable cause)
NlfException
with the specified identifier and cause. The identifier maps to
a message that is used as the exception's detail message in the constructor of java.lang.Exception
.
id
- the exception identifier.cause
- the java.lang.Throwable
that caused this exception.public NlfException(ExceptionId id, java.io.File file)
NlfException
with the specified identifier and file. The identifier maps to
a message that is used as the exception's detail message in the constructor of java.lang.Exception
.
id
- the exception identifier.file
- the file that is associated with the exception, usually the file on which the exception
occurred.public NlfException(ExceptionId id, java.io.File file, java.lang.Throwable cause)
NlfException
with the specified identifier, file and cause. The identifier
maps to a message that is used as the exception's detail message in the constructor of java.lang.Exception
.
id
- the exception identifier.file
- the file that is associated with the exception, usually the file on which the exception
occurred.cause
- the java.lang.Throwable
that caused this exception.public NlfException(ExceptionId id, java.io.File file, long offset)
NlfException
with the specified identifier, file and offset. The identifier
maps to a message that is used as the exception's detail message in the constructor of java.lang.Exception
.
id
- the exception identifier.file
- the file that is associated with the exception, usually the file on which the
exception occurred.offset
- the offset that is associated with the exception, usually the offset to file
at which the exception occurred.public NlfException(ExceptionId id, java.io.File file, long offset, java.lang.Throwable cause)
NlfException
with the specified identifier, file, offset and cause. The
identifier maps to a message that is used as the exception's detail message in the constructor of
java.lang.Exception
.
id
- the exception identifier.file
- the file that is associated with the exception, usually the file on which the
exception occurred.offset
- the offset that is associated with the exception, usually the offset to file
at which the exception occurred.cause
- the java.lang.Throwable
that caused this exception.Method Detail |
---|
public ExceptionId getId()
public java.io.File getFile()
null
value indicates that no file
is associated with the exception.getOffset()
public long getOffset()
-1
if the offset is not set to a
legal value. The offset will usually be an offset to the file returned by getFile()
at
which the exception occurred.
-1
indicates that the
offset has not been set, or that it was set to an illegal value.getFile()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |