MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / fail

Function fail

ses.cjs:1816–1825  ·  view source on GitHub ↗
(
    optDetails=  assertFailedDetails,
    ErrorConstructor=  globalThis.Error)

Source from the content-addressed store, hash-verified

1814
1815 /** @type {AssertFail} */
1816 const fail= (
1817 optDetails= assertFailedDetails,
1818 ErrorConstructor= globalThis.Error)=>
1819 {
1820 const reason= makeError(optDetails, ErrorConstructor);
1821 if( optRaise!== undefined) {
1822 optRaise(reason);
1823 }
1824 throw reason;
1825 };
1826 freeze(fail);
1827
1828 /** @type {FailTag} */

Callers 4

FailFunction · 0.85
baseAssertFunction · 0.85
equalFunction · 0.85
assertTypeofFunction · 0.85

Calls 1

makeErrorFunction · 0.85

Tested by

no test coverage detected