diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-08-26 18:20:22 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2020-08-26 18:48:04 +0200 |
commit | c8b5f1e454d5cb2bd7580bbe0ac4fa83237e9f41 (patch) | |
tree | 6982e7cd91eb17e85c89658bc078947b6a4e8c04 /core/core.js | |
parent | 765235341b6075bcf64d8ebcdb61e350d251514d (diff) |
Simplify ErrBox-to-class mapping & hook it up to core json ops (#7195)
Diffstat (limited to 'core/core.js')
-rw-r--r-- | core/core.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/core.js b/core/core.js index 82a812030..bf8052871 100644 --- a/core/core.js +++ b/core/core.js @@ -188,17 +188,17 @@ SharedQueue Binary Layout return send(opsCache[opName], control, ...zeroCopy); } - function registerErrorClass(errorName, errorClass) { + function registerErrorClass(errorName, className) { if (typeof errorMap[errorName] !== "undefined") { throw new TypeError(`Error class for "${errorName}" already registered`); } - errorMap[errorName] = errorClass; + errorMap[errorName] = className; } function getErrorClass(errorName) { - const errorClass = errorMap[errorName]; - assert(errorClass); - return errorClass; + const className = errorMap[errorName]; + assert(className); + return className; } // Returns Uint8Array |