|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.Avrora
The Avrora
class contains several utilities relating to exceptions and errors within Avrora.
Nested Class Summary | |
static class |
Avrora.Error
The Error class is the base class of all errors in Avrora. |
static class |
Avrora.InternalError
The InternalError class is a class of errors corresponding to exceptional conditions
within Avrora. |
static class |
Avrora.Unexpected
The Unexpected class wraps an unexpected exception that may happen during
execution. |
Constructor Summary | |
Avrora()
|
Method Summary | |
static Avrora.InternalError |
failure(java.lang.String s)
The failure() method is a utility that constructs a
InternalError instance with the specified message. |
static Avrora.Unexpected |
unexpected(java.lang.Throwable t)
The unexpected() method is a utility method that wraps an unexpected exception
so that it can be throw again and reported later. |
static Avrora.InternalError |
unimplemented()
The unimplemented() method is a utility that constructs a
InternalError instance. |
static void |
userError(java.lang.String s)
The userError() method constructs and throws an error in situations that are likely
due to user error. |
static void |
userError(java.lang.String s,
java.lang.String p)
The userError() method constructs and throws an error in situations that are likely
due to user error. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Avrora()
Method Detail |
public static Avrora.InternalError unimplemented()
unimplemented()
method is a utility that constructs a
InternalError
instance. This is called from methods or classes with unimplemented
functionality for documentation and fail-fast purposes.
Avrora.InternalError
class that specifies that this
functionality is not yet implementedpublic static Avrora.InternalError failure(java.lang.String s)
failure()
method is a utility that constructs a
InternalError
instance with the specified message. It is useful for internal
error conditions and defensive programming.
Avrora.InternalError
class with the specified error messagepublic static Avrora.Unexpected unexpected(java.lang.Throwable t)
unexpected()
method is a utility method that wraps an unexpected exception
so that it can be throw again and reported later. This is useful for code that does IO but does
not want to handle IO exceptions, for example.
t
- the throwable that was encountered
Unexpected
class that wraps up the thrown exceptionpublic static void userError(java.lang.String s)
userError()
method constructs and throws an error in situations that are likely
due to user error. This is useful for files that are not found, an incorrect option value, etc.
s
- the message for the userpublic static void userError(java.lang.String s, java.lang.String p)
userError()
method constructs and throws an error in situations that are likely
due to user error. This is useful for files that are not found, an incorrect option value, etc.
s
- the message for the userp
- the parameter to the message, automatically put in quotes
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |