error.js 744 B

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