ErrorFactory
JavaScript: Error Factory
All JavaScript exception intrinsics are expected to implement this interface on their companion object; this allows for dynamic extension/implementation of a given JS exception, based on an originating Java exception.
When constructing a JS error from a Java exception, Elide will attempt to use an appropriate JS error type, and will provide the maximum amount of developer ergonomics possible to identify where the error took place.
Parameters
type of JavaScript error implemented by this factory. Must implement AbstractJsException.
See also
for the regular object interface implemented for each JS exception type.
Inheritors
Functions
Create a JavaScript-environment error of type T (an AbstractJsException) which wraps the provided Throwable. Any non-private fields and information on the provided Throwable will be included with the JS error.
Create a JavaScript-environment error of type T (an AbstractJsException) which wraps the provided message string and optional Throwable. Any non-private fields and information on the provided Throwable, if present, will be included with the JS error.