error.js 819 B

12345678910111213141516171819
  1. Object.defineProperty(exports, '__esModule', { value: true });
  2. /** An error emitted by Sentry SDKs and related utilities. */
  3. class SentryError extends Error {
  4. /** Display name of this error instance. */
  5. constructor( message, logLevel = 'warn') {
  6. super(message);this.message = message;
  7. this.name = new.target.prototype.constructor.name;
  8. // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line
  9. // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes
  10. // instances of `SentryError` fail `obj instanceof SentryError` checks.
  11. Object.setPrototypeOf(this, new.target.prototype);
  12. this.logLevel = logLevel;
  13. }
  14. }
  15. exports.SentryError = SentryError;
  16. //# sourceMappingURL=error.js.map