mirror of
https://github.com/konsoletyper/teavm.git
synced 2025-04-18 12:40:27 +08:00
wasm gc: support JSExceptions.getJSException
This commit is contained in:
parent
da848c523b
commit
bdc9fe757a
@ -549,6 +549,10 @@ function jsoImports(imports, context) {
|
||||
},
|
||||
concatArray: (a, b) => [...a, ...b],
|
||||
getJavaException: e => e[javaExceptionSymbol],
|
||||
getJSException: e => {
|
||||
let getJsException = context.exports["teavm.getJsException"]
|
||||
return getJsException(e);
|
||||
},
|
||||
jsExports: () => context.userExports
|
||||
};
|
||||
for (let name of ["wrapByte", "wrapShort", "wrapChar", "wrapInt", "wrapLong", "wrapFloat", "wrapDouble",
|
||||
|
@ -24,5 +24,6 @@ public final class JSExceptions {
|
||||
@Import(name = "getJavaException", module = "teavmJso")
|
||||
public static native Throwable getJavaException(JSObject e);
|
||||
|
||||
public static native JSObject getJSException(Throwable e);
|
||||
@Import(name = "getJSException", module = "teavmJso")
|
||||
public static native JSObject su(Throwable e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user