BaseWrappedException
com.jsmacrosce.jsmacros.core.language.BaseWrappedException
A linked diagnostic record for an exception or stack frame.
The next links form a diagnostic chain, not a Java Throwable cause chain; values are stored by reference without validation or copying.
js
const Wrapped = Java.type("com.jsmacrosce.jsmacros.core.language.BaseWrappedException");
const entry = new Wrapped("script", "diagnostic", null, null);
Chat.log(entry.message);Type Parameters
T: type of the wrapped exception or stack-frame object
Nested types
Constructors
new BaseWrappedException
new BaseWrappedException(T exception, String message, BaseWrappedException.SourceLocation location, BaseWrappedException<?> next)#Stores the supplied object, message, location, and next entry without copying or validation.
Parameters:
exception: wrapped exception or stack-frame objectmessage: diagnostic text for this entrylocation: source location, ornullwhen unavailablenext: next diagnostic entry, ornullat the end of the chain
Fields
location
Source location for this entry, or
null when unavailable.message
next
The next diagnostic entry, or
null at the end of the chain.stackFrame
The supplied exception or stack-frame object.
Methods
wrapHostElement
static wrapHostElement(StackTraceElement t, BaseWrappedException<?> next): BaseWrappedException<StackTraceElement>#Wraps one host stack-frame element as a diagnostic entry linked to
next. Its message uses the unqualified class and method names; the location describes native frames, source file and line when available, or an unknown source.Parameters:
t: host stack-frame elementnext: next diagnostic entry, ornullat the end of the chain
Returns: an entry containing the host frame and its display location