|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.io.IOException
de.schlichtherle.io.ChainableIOException
de.schlichtherle.io.ArchiveException
public class ArchiveException
Represents a chain of exceptions thrown by the File.umount()
and
File.update()
methods to indicate an error condition which
does incur loss of data.
Both methods catch any exceptions occuring throughout their processing
and store them in an exception chain until all archive files have been
updated.
Finally, if the exception chain is not empty, it's reordered and thrown
so that if its head is an instance of ArchiveWarningException
,
only instances of this class or its subclasses are in the chain, but no
instances of ArchiveException
or its subclasses (except
ArchiveWarningException
, of course).
This enables client applications to do a simple case distinction with a try-catch-block like this to react selectively:
try {
File.umount();
} catch (ArchiveWarningException warning) {
// Only warnings have occured and no data has been lost - ignore this.
} catch (ArchiveException error) {
// Some data has been lost - panic!
error.printStackTrace();
}
ArchiveControllerException
)Constructor Summary | |
---|---|
ArchiveException(ArchiveException priorException)
Constructs a new exception with the specified prior exception. |
|
ArchiveException(ArchiveException priorException,
IOException cause)
Constructs a new exception with the specified prior exception and the cause. |
|
ArchiveException(ArchiveException priorException,
String message)
Constructs a new exception with the specified prior exception and a message. |
|
ArchiveException(ArchiveException priorException,
String message,
IOException cause)
Constructs a new exception with the specified prior exception, a message and a cause. |
Method Summary |
---|
Methods inherited from class de.schlichtherle.io.ChainableIOException |
---|
clone, getAppearance, getMaxPrintExceptions, getPrior, getPriority, initCause, initCause, printStackTrace, printStackTrace, printStackTrace, printStackTrace, setMaxPrintExceptions, sortAppearance, sortPriority |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArchiveException(ArchiveException priorException)
priorException
- An exception that happened before and that was
caught. This is not a cause! May be null.public ArchiveException(ArchiveException priorException, String message)
priorException
- An exception that happened before and that was
caught. This is not a cause! May be null.message
- The message for this exception.public ArchiveException(ArchiveException priorException, IOException cause)
priorException
- An exception that happened before and that was
caught. This is not a cause! May be null.cause
- The cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.).public ArchiveException(ArchiveException priorException, String message, IOException cause)
priorException
- An exception that happened before and that was
caught. This is not a cause! May be null.message
- The message for this exception.cause
- The cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |