MCPcopy Index your code
hub / github.com/SmartThingsCommunity/smartthings-cli / fatalError

Function fatalError

src/lib/util.ts:40–46  ·  view source on GitHub ↗
(error?: string | Error, code = 1)

Source from the content-addressed store, hash-verified

38export const delay = async (ms: number): Promise<void> => new Promise(resolve => setTimeout(resolve, ms))
39
40export const fatalError = (error?: string | Error, code = 1): never => {
41 if (error) {
42 console.error(error)
43 }
44 // eslint-disable-next-line no-process-exit
45 process.exit(code)
46}
47
48/**
49 * Cancel running command with optional message. This would generally be chosen when the user

Callers 15

handlerFunction · 0.85
handlerFunction · 0.85
handlerFunction · 0.85
handlerFunction · 0.85
createCapabilityFunction · 0.85
handlerFunction · 0.85
askUserForHubFunction · 0.85
handlerFunction · 0.85
handlerFunction · 0.85
handlerFunction · 0.85
createAppFunction · 0.85
handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected