mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 20:59:10 +00:00
Simplify ErrBox-to-class mapping & hook it up to core json ops (#7195)
This commit is contained in:
parent
765235341b
commit
c8b5f1e454
11 changed files with 57 additions and 67 deletions
|
@ -21,7 +21,7 @@
|
|||
|
||||
function unwrapResponse(res) {
|
||||
if (res.err != null) {
|
||||
throw new (core.getErrorClass(res.err.kind))(res.err.message);
|
||||
throw new (core.getErrorClass(res.err.className))(res.err.message);
|
||||
}
|
||||
util.assert(res.ok != null);
|
||||
return res.ok;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue