MCPcopy Create free account
hub / github.com/firebase/firebase-tools / errorOut

Function errorOut

src/errorOut.ts:8–24  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

6 * @param error an Error to be logged.
7 */
8export function errorOut(error: Error): void {
9 let fbError: FirebaseError;
10 if (error instanceof FirebaseError) {
11 fbError = error;
12 } else {
13 fbError = new FirebaseError("An unexpected error has occurred.", {
14 original: error,
15 exit: 2,
16 });
17 }
18
19 logError(fbError);
20 process.exitCode = fbError.exit || 2;
21 setTimeout(() => {
22 process.exit();
23 }, 250);
24}

Callers 2

errorOut.spec.tsFile · 0.90
cliFunction · 0.90

Calls 2

logErrorFunction · 0.90
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…