mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 20:59:10 +00:00
Encode op errors as strings instead of numbers (#6977)
This commit is contained in:
parent
479164d287
commit
59ca66a207
14 changed files with 197 additions and 293 deletions
|
@ -3,7 +3,6 @@
|
|||
((window) => {
|
||||
const core = window.Deno.core;
|
||||
const util = window.__bootstrap.util;
|
||||
const getErrorClass = window.__bootstrap.errors.getErrorClass;
|
||||
// Using an object without a prototype because `Map` was causing GC problems.
|
||||
const promiseTable = Object.create(null);
|
||||
let _nextPromiseId = 1;
|
||||
|
@ -22,7 +21,7 @@
|
|||
|
||||
function unwrapResponse(res) {
|
||||
if (res.err != null) {
|
||||
throw new (getErrorClass(res.err.kind))(res.err.message);
|
||||
throw new (core.getErrorClass(res.err.kind))(res.err.message);
|
||||
}
|
||||
util.assert(res.ok != null);
|
||||
return res.ok;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue