Package dev.gmitch215.bytebox.concurrent
Class JSRejection
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.gmitch215.bytebox.concurrent.JSRejection
- All Implemented Interfaces:
Serializable
A JavaScript promise rejected with something that is not a Java throwable.
Thrown by Async.await(org.teavm.jso.core.JSPromise) when a platform call fails: a
binding that refuses, a request that could not be sent, a stream that broke. The message is what
JavaScript rejected with, its stack when it had one.
Unchecked, because every binding on Env reads as a plain method
call and a checked exception on each of them would be ceremony rather than safety. A handler that
wants to survive a failing binding catches this; one that does not lets the invocation fail, which
is what the platform reports.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
JSRejection
- Parameters:
message- what the promise rejected with
-