Skip to content

Commit 99bde12

Browse files
committed
make eventFromException and eventFromMessage abstract in BaseClient
1 parent bb1f5ba commit 99bde12

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

packages/core/src/baseclient.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -266,21 +266,6 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
266266
}
267267
}
268268

269-
/**
270-
* @inheritDoc
271-
*/
272-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
273-
public eventFromException(_exception: any, _hint?: EventHint): PromiseLike<Event> {
274-
throw new SentryError('Client has to implement `eventFromException` method');
275-
}
276-
277-
/**
278-
* @inheritDoc
279-
*/
280-
public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike<Event> {
281-
throw new SentryError('Client has to implement `eventFromMessage` method');
282-
}
283-
284269
/**
285270
* @inheritDoc
286271
*/
@@ -712,6 +697,17 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
712697
protected _setupTransport(): Transport {
713698
return new NoopTransport();
714699
}
700+
701+
/**
702+
* @inheritDoc
703+
*/
704+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
705+
public abstract eventFromException(_exception: any, _hint?: EventHint): PromiseLike<Event>;
706+
707+
/**
708+
* @inheritDoc
709+
*/
710+
public abstract eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike<Event>;
715711
}
716712

717713
/**

0 commit comments

Comments
 (0)