public class StaticIllegalArgumentException extends java.lang.IllegalArgumentException implements StaticThrowable<StaticIllegalArgumentException>
IllegalArgumentException to be thrown by RTSJ methods
that does not require allocation.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 StaticIllegalArgumentException |
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.
|
StaticIllegalArgumentException |
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[] trace)
This method enables overriding the stack trace that was filled
during construction of this object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinit, init, init, init, isStatic, writeReplacepublic static StaticIllegalArgumentException get()
Throwable. Allocation is
done in memory that acts like ImmortalMemory. The message,
cause, and the stack are cleared. It should be initialized
before throwing.public java.lang.String getMessage()
StaticThrowablegetMessage in interface StaticThrowable<StaticIllegalArgumentException>getMessage in class java.lang.Throwablenull.public java.lang.String getLocalizedMessage()
StaticThrowable
By default it returns getMessage().
getLocalizedMessage in interface StaticThrowable<StaticIllegalArgumentException>getLocalizedMessage in class java.lang.ThrowablegetMessage().public java.lang.Throwable initCause(java.lang.Throwable causingThrowable)
StaticThrowableStaticThrowableStorage associated with this task.initCause in interface StaticThrowable<StaticIllegalArgumentException>initCause in class java.lang.ThrowablecausingThrowable - The reason why this Throwable
gets thrown.Throwable.public java.lang.Throwable getCause()
StaticThrowablenull 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<StaticIllegalArgumentException>getCause in class java.lang.Throwablenull.public java.lang.Throwable fillInStackTrace()
StaticThrowableStaticThrowableStorage associated with this task.fillInStackTrace in interface StaticThrowable<StaticIllegalArgumentException>fillInStackTrace in class java.lang.ThrowableThrowable.public void setStackTrace(java.lang.StackTraceElement[] trace)
throws java.lang.NullPointerException
StaticThrowablesetStackTrace in interface StaticThrowable<StaticIllegalArgumentException>setStackTrace in class java.lang.Throwabletrace - 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()
StaticThrowableThrowable 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<StaticIllegalArgumentException>getStackTrace in class java.lang.Throwablenull.public void printStackTrace()
StaticThrowableThrowable 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<StaticIllegalArgumentException>printStackTrace in class java.lang.Throwablepublic void printStackTrace(java.io.PrintStream stream)
StaticThrowableThrowable 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<StaticIllegalArgumentException>printStackTrace in class java.lang.Throwablestream - The stream to print to.public void printStackTrace(java.io.PrintWriter writer)
StaticThrowableThrowable 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<StaticIllegalArgumentException>printStackTrace in class java.lang.Throwablewriter - The PrintWriter to write to.public StaticIllegalArgumentException getSingleton()
StaticThrowablegetSingleton in interface StaticThrowable<StaticIllegalArgumentException>