MCPcopy Create free account
hub / github.com/bitpay/bitcore / die

Method die

packages/bitcore-cli/src/utils.ts:18–28  ·  view source on GitHub ↗
(err?: string | Error)

Source from the content-addressed store, hash-verified

16 }
17
18 static die(err?: string | Error) {
19 if (err) {
20 if (err instanceof Error && err.name === 'ExitPromptError') {
21 // prompt exit error, just log and exit gracefully
22 Utils.goodbye();
23 } else {
24 prompt.log.error('!! ' + (_verbose && (err as Error).stack ? (err as Error).stack : err.toString()));
25 }
26 process.exit(1);
27 }
28 }
29
30 static goodbye() {
31 const funMessages = [

Callers 9

utils.test.tsFile · 0.80
wallet.tsFile · 0.80
getClientMethod · 0.80
loadMethod · 0.80
saveMethod · 0.80
isCompleteMethod · 0.80
loadMethod · 0.80
parseAmountMethod · 0.80
cli.tsFile · 0.80

Calls 3

goodbyeMethod · 0.80
errorMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected