MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / assert

Function assert

lib.commonjs/utils/errors.js:155–159  ·  view source on GitHub ↗

* Throws an EthersError with %%message%%, %%code%% and additional error * %%info%% when %%check%% is falsish.. * * @see [[api:makeError]]

(check, message, code, info)

Source from the content-addressed store, hash-verified

153 * @see [[api:makeError]]
154 */
155function assert(check, message, code, info) {
156 if (!check) {
157 throw makeError(message, code, info);
158 }
159}
160exports.assert = assert;
161/**
162 * A simple helper to simply ensuring provided arguments match expected

Callers 4

assertArgumentFunction · 0.70
assertArgumentCountFunction · 0.70
assertNormalizeFunction · 0.70
assertPrivateFunction · 0.70

Calls 1

makeErrorFunction · 0.70

Tested by

no test coverage detected