InternalIssueFactory.js 704 B

1234567891011121314151617
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var IssueOrigin_1 = require("../IssueOrigin");
  4. var IssueSeverity_1 = require("../IssueSeverity");
  5. function createIssueFromInternalError(error) {
  6. return {
  7. origin: IssueOrigin_1.IssueOrigin.INTERNAL,
  8. severity: IssueSeverity_1.IssueSeverity.ERROR,
  9. code: 'INTERNAL',
  10. message: typeof error.message === 'string'
  11. ? error.message
  12. : (error.toString && error.toString()) || '',
  13. stack: typeof error.stack === 'string' ? error.stack : undefined
  14. };
  15. }
  16. exports.createIssueFromInternalError = createIssueFromInternalError;
  17. //# sourceMappingURL=InternalIssueFactory.js.map