Skip to content

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 object
  • message: diagnostic text for this entry
  • location: source location, or null when unavailable
  • next: next diagnostic entry, or null at the end of the chain

Fields ​

location ​

Source location for this entry, or null when unavailable.

message ​

message: Stringread-only#
Diagnostic text for this entry.

next ​

next: BaseWrappedException<?>read-only#
The next diagnostic entry, or null at the end of the chain.

stackFrame ​

stackFrame: Tread-only#
The supplied exception or stack-frame object.

Methods ​

wrapHostElement ​

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 element
  • next: next diagnostic entry, or null at the end of the chain
Returns: an entry containing the host frame and its display location