diff options
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/10_dispatch_minimal.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/js/10_dispatch_minimal.js b/runtime/js/10_dispatch_minimal.js index 4d6af6fc3..e74f8c393 100644 --- a/runtime/js/10_dispatch_minimal.js +++ b/runtime/js/10_dispatch_minimal.js @@ -51,13 +51,13 @@ function unwrapResponse(res) { if (res.err != null) { - const ErrorClass = core.getErrorClass(res.err.className); + const [ErrorClass, args] = core.getErrorClassAndArgs(res.err.className); if (!ErrorClass) { throw new Error( `Unregistered error class: "${res.err.className}"\n ${res.err.message}\n Classes of errors returned from ops should be registered via Deno.core.registerErrorClass().`, ); } - throw new ErrorClass(res.err.message); + throw new ErrorClass(res.err.message, ...args); } return res.result; } |