暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.errorOut = void 0;
  4. const logError_1 = require("./logError");
  5. const error_1 = require("./error");
  6. function errorOut(error) {
  7. let fbError;
  8. if (error instanceof error_1.FirebaseError) {
  9. fbError = error;
  10. }
  11. else {
  12. fbError = new error_1.FirebaseError("An unexpected error has occurred.", {
  13. original: error,
  14. exit: 2,
  15. });
  16. }
  17. (0, logError_1.logError)(fbError);
  18. process.exitCode = fbError.exit || 2;
  19. setTimeout(() => {
  20. process.exit();
  21. }, 250);
  22. }
  23. exports.errorOut = errorOut;