(error: Error)
| 6 | * @param error an Error to be logged. |
| 7 | */ |
| 8 | export 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 | } |
no test coverage detected
searching dependent graphs…