reportUnhandledError.js 619 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.reportUnhandledError = void 0;
  4. var config_1 = require("../config");
  5. var timeoutProvider_1 = require("../scheduler/timeoutProvider");
  6. function reportUnhandledError(err) {
  7. timeoutProvider_1.timeoutProvider.setTimeout(function () {
  8. var onUnhandledError = config_1.config.onUnhandledError;
  9. if (onUnhandledError) {
  10. onUnhandledError(err);
  11. }
  12. else {
  13. throw err;
  14. }
  15. });
  16. }
  17. exports.reportUnhandledError = reportUnhandledError;
  18. //# sourceMappingURL=reportUnhandledError.js.map