public class ConstructorCheckedException extends java.lang.InstantiationException implements StaticThrowable<ConstructorCheckedException>
MemoryArea.newInstance(java.lang.Class<T>)
causes the constructor of
the new instance to throw a checked exception.StaticThrowable.Hidden
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
fillInStackTrace()
Calls into the virtual machine to capture the current stack trace
in task's local memory.
|
static ConstructorCheckedException |
get()
Gets the preallocated version of this
Throwable . |
java.lang.Throwable |
getCause()
getCause returns the cause of this 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()
get the message describing the problem from task's local memory.
|
ConstructorCheckedException |
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()
Get the stack trace created by fillInStackTrace for this Throwable as an
array of StackTraceElements.
|
java.lang.Throwable |
initCause(java.lang.Throwable causingThrowable)
Initializes the cause to the given Throwable is task's local memory.
|
void |
printStackTrace()
Print stack trace of this Throwable to System.err.
|
void |
printStackTrace(java.io.PrintStream stream)
Print the stack trace of this Throwable to the given stream.
|
void |
printStackTrace(java.io.PrintWriter writer)
Print the stack trace of this Throwable to the given PrintWriter.
|
void |
setStackTrace(java.lang.StackTraceElement[] trace)
This method allows 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 ConstructorCheckedException get()
Throwable
. Allocation is
done in memory that acts like ImmortalMemory
. The message and
cause are cleared and the stack trace is filled out.public ConstructorCheckedException getSingleton()
StaticThrowable
getSingleton
in interface StaticThrowable<ConstructorCheckedException>
public java.lang.String getMessage()
StaticThrowable
getMessage
in interface StaticThrowable<ConstructorCheckedException>
getMessage
in class java.lang.Throwable
null
when no
message was set.public java.lang.String getLocalizedMessage()
StaticThrowable
By default it returns getMessage()
.
getLocalizedMessage
in interface StaticThrowable<ConstructorCheckedException>
getLocalizedMessage
in class java.lang.Throwable
getMessage()
.public java.lang.Throwable initCause(java.lang.Throwable causingThrowable)
StaticThrowable
initCause
in interface StaticThrowable<ConstructorCheckedException>
initCause
in class java.lang.Throwable
causingThrowable
- the reason why this Throwable gets Thrown.public java.lang.Throwable getCause()
StaticThrowable
null
when no cause
was set. The cause is another exception that was caught before this
exception was created.getCause
in interface StaticThrowable<ConstructorCheckedException>
getCause
in class java.lang.Throwable
null
.public java.lang.Throwable fillInStackTrace()
StaticThrowable
fillInStackTrace
in interface StaticThrowable<ConstructorCheckedException>
fillInStackTrace
in class java.lang.Throwable
Throwable
.public void setStackTrace(java.lang.StackTraceElement[] trace) throws java.lang.NullPointerException
StaticThrowable
setStackTrace
in interface StaticThrowable<ConstructorCheckedException>
setStackTrace
in class java.lang.Throwable
trace
- the stack trace to replace be used.java.lang.NullPointerException
- when new_stackTrace or any element of
new_stackTrace is null
.public java.lang.StackTraceElement[] getStackTrace()
StaticThrowable
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<ConstructorCheckedException>
getStackTrace
in class java.lang.Throwable
null
.public void printStackTrace()
StaticThrowable
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<ConstructorCheckedException>
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream stream)
StaticThrowable
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<ConstructorCheckedException>
printStackTrace
in class java.lang.Throwable
stream
- the stream to print to.public void printStackTrace(java.io.PrintWriter writer)
StaticThrowable
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<ConstructorCheckedException>
printStackTrace
in class java.lang.Throwable
writer
- the PrintWriter to write to.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2022 aicas GmbH. All Rights Reserved.