Skip to content

Commit e5477e2

Browse files
committed
make eventFromException and eventFromMessage abstract in BaseClient
1 parent 3fb0738 commit e5477e2

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

packages/core/src/basebackend.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,6 @@ export abstract class BaseBackend<O extends Options> implements Backend {
7979
this._transport = this._setupTransport();
8080
}
8181

82-
/**
83-
* @inheritDoc
84-
*/
85-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
86-
public eventFromException(_exception: any, _hint?: EventHint): PromiseLike<Event> {
87-
throw new SentryError('Backend has to implement `eventFromException` method');
88-
}
89-
90-
/**
91-
* @inheritDoc
92-
*/
93-
public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike<Event> {
94-
throw new SentryError('Backend has to implement `eventFromMessage` method');
95-
}
96-
9782
/**
9883
* @inheritDoc
9984
*/
@@ -158,4 +143,15 @@ export abstract class BaseBackend<O extends Options> implements Backend {
158143
protected _setupTransport(): Transport {
159144
return new NoopTransport();
160145
}
146+
147+
/**
148+
* @inheritDoc
149+
*/
150+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
151+
public abstract eventFromException(_exception: any, _hint?: EventHint): PromiseLike<Event>;
152+
153+
/**
154+
* @inheritDoc
155+
*/
156+
public abstract eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike<Event>;
161157
}

0 commit comments

Comments
 (0)