public class StaticIllegalStateException extends java.lang.IllegalStateException implements StaticThrowable<StaticIllegalStateException>
Schedulable
instance attempts to
access a memory which is illegal in the memories current state. For
instance, some memory areas have limits from what other area they may
be entered into.StaticThrowable.Hidden
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
fillInStackTrace()
Calls into the virtual machine to capture the current stack trace in
the instance of
StaticThrowableStorage associated with this task. |
static StaticIllegalStateException |
get()
Gets the preallocated version of this
Throwable . |
java.lang.Throwable |
getCause()
Gets the cause from thread local memory of the calling exception or
null when no cause was set. |
java.lang.String |
getLocalizedMessage()
Subclasses may override this message to get an error message that
is localized to the default locale.
|
java.lang.String |
getMessage()
Gets the message describing the exception's cause from thread
local memory.
|
StaticIllegalStateException |
getSingleton()
For the case of legacy code that creates an RTSJ exception
explicity, this provides a means of obtaining its singleton version.
|
java.lang.StackTraceElement[] |
getStackTrace()
Gets the stack trace created by fillInStackTrace for this
Throwable from the current thread local storage as an
array of StackTraceElements. |
java.lang.Throwable |
initCause(java.lang.Throwable causingThrowable)
Store the cause of calling exception in the instance of
StaticThrowableStorage associated with this task. |
void |
printStackTrace()
Prints stack trace of this
Throwable to System.err. |
void |
printStackTrace(java.io.PrintStream stream)
Prints the stack trace of this
Throwable to the given stream. |
void |
printStackTrace(java.io.PrintWriter writer)
Prints the stack trace of this
Throwable to the given PrintWriter. |
void |
setStackTrace(java.lang.StackTraceElement[] new_stackTrace)
This method enables overriding the stack trace that was filled
during construction of this object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
init, init, init, init, isStatic, writeReplace
public static StaticIllegalStateException get()
Throwable
. Allocation is
done in memory that acts like ImmortalMemory
. The message,
cause, and the stack trace are cleared. It should be initialized
before throwing.public java.lang.String getMessage()
StaticThrowable
getMessage
in interface StaticThrowable<StaticIllegalStateException>
getMessage
in class java.lang.Throwable
null
.public java.lang.String getLocalizedMessage()
StaticThrowable
By default it returns getMessage()
.
getLocalizedMessage
in interface StaticThrowable<StaticIllegalStateException>
getLocalizedMessage
in class java.lang.Throwable
getMessage()
.public java.lang.Throwable initCause(java.lang.Throwable causingThrowable)
StaticThrowable
StaticThrowableStorage
associated with this task.initCause
in interface StaticThrowable<StaticIllegalStateException>
initCause
in class java.lang.Throwable
causingThrowable
- The reason why this Throwable
gets thrown.Throwable
.public java.lang.Throwable getCause()
StaticThrowable
null
when no cause was set. The cause is another
exception that was caught before the current exception is to be thrown.getCause
in interface StaticThrowable<StaticIllegalStateException>
getCause
in class java.lang.Throwable
null
.public java.lang.Throwable fillInStackTrace()
StaticThrowable
StaticThrowableStorage
associated with this task.fillInStackTrace
in interface StaticThrowable<StaticIllegalStateException>
fillInStackTrace
in class java.lang.Throwable
Throwable
.public void setStackTrace(java.lang.StackTraceElement[] new_stackTrace) throws java.lang.NullPointerException
StaticThrowable
setStackTrace
in interface StaticThrowable<StaticIllegalStateException>
setStackTrace
in class java.lang.Throwable
new_stackTrace
- the stack trace to be used as replace.java.lang.NullPointerException
- when new_stackTrace or any element of
new_stackTrace is null
.public java.lang.StackTraceElement[] getStackTrace()
StaticThrowable
Throwable
from the current thread local storage as an
array of StackTraceElements.
The stack trace does not need to contain entries for all methods that are actually on the call stack, the virtual machine may decide to skip some stack trace entries. Even an empty array is a valid result of this function.
Repeated calls of this function without intervening calls to fillInStackTrace will return the same result.
When memory areas of the RTSJ are used (see MemoryArea
),
and this Throwable
was allocated in a
different memory area than the current allocation context, the
resulting stack trace will be allocated in either the same memory
area this
was allocated in or the current memory area,
depending on which is the least deeply nested, thereby creating
objects that are assignment compatible with both areas.
getStackTrace
in interface StaticThrowable<StaticIllegalStateException>
getStackTrace
in class java.lang.Throwable
null
.public void printStackTrace()
StaticThrowable
Throwable
to System.err.
The printed stack trace contains the result of toString()
as the
first line followed by one line for each stack trace element that
contains the name of the method or constructor, optionally
followed by the source file name and source file line number when
available.
printStackTrace
in interface StaticThrowable<StaticIllegalStateException>
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream stream)
StaticThrowable
Throwable
to the given stream.
The printed stack trace contains the result of toString()
as the
first line followed by one line for each stack trace element that
contains the name of the method or constructor, optionally
followed by the source file name and source file line number when
available.
printStackTrace
in interface StaticThrowable<StaticIllegalStateException>
printStackTrace
in class java.lang.Throwable
stream
- The stream to print to.public void printStackTrace(java.io.PrintWriter writer)
StaticThrowable
Throwable
to the given PrintWriter.
The printed stack trace contains the result of toString()
as the
first line followed by one line for each stack trace element that
contains the name of the method or constructor, optionally
followed by the source file name and source file line number when
available.
printStackTrace
in interface StaticThrowable<StaticIllegalStateException>
printStackTrace
in class java.lang.Throwable
writer
- The PrintWriter to write to.public StaticIllegalStateException getSingleton()
StaticThrowable
getSingleton
in interface StaticThrowable<StaticIllegalStateException>