public class ConditionException
extends java.lang.RuntimeException
This class is an unchecked exception because the generated code always
emits catch blocks regardless of whether the body of the try
block can generate these exceptions or not. The Java compiler fails in
this condition (we have too much exception processing). The other solution
to this is to exhaustively analyze all try
bodies to
determine if any catch
blocks must be removed. This has no
runtime benefit and is such a huge/complex effort that it is not
warrented. Instead we use unchecked exceptions.
Modifier and Type | Field and Description |
---|---|
private static boolean |
captureStack
Flag indicating whether we capture stack trace data
|
private int |
keycode
If caused by a key press, this stores the key code.
|
private static java.util.logging.Logger |
LOG
Logger
|
Constructor and Description |
---|
ConditionException(java.lang.String message)
Constructor which accepts an error message.
|
ConditionException(java.lang.String message,
int keycode)
Constructor which accepts an error message and the key code for the key
press that caused this condition.
|
ConditionException(java.lang.String message,
java.lang.Throwable rootCause)
Constructor which accepts an error message and a root cause.
|
ConditionException(java.lang.Throwable rootCause)
Constructor which accepts and wrappers a root cause.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
fillInStackTrace()
Fills in the execution stack trace.
|
int |
getKeyCode()
Returns the key code that was the cause of this condition.
|
private static final java.util.logging.Logger LOG
private static final boolean captureStack
private int keycode
public ConditionException(java.lang.String message)
message
- Error message.public ConditionException(java.lang.String message, int keycode)
message
- Error message.keycode
- The key code of the key that caused this condition to be
raised.public ConditionException(java.lang.String message, java.lang.Throwable rootCause)
message
- Error message.rootCause
- Exception which has been caught in the course of processing.public ConditionException(java.lang.Throwable rootCause)
rootCause
- Exception which has been caught in the course of processing.public int getKeyCode()
public java.lang.Throwable fillInStackTrace()
Throwable
object information about the current state of
the stack frames for the current thread.
If the stack trace of this Throwable
is not
writable, calling this method has no effect.
fillInStackTrace
in class java.lang.Throwable
Throwable
instance.Throwable.printStackTrace()