Simplify ErrBox-to-class mapping & hook it up to core json ops (#7195)

This commit is contained in:
Bert Belder 2020-08-26 18:20:22 +02:00
parent 765235341b
commit c8b5f1e454
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
11 changed files with 57 additions and 67 deletions

View file

@ -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;