All files / core/lib Sentry.ts

100% Statements 14/14
100% Branches 0/0
100% Functions 5/5
100% Lines 14/14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23  2x 2x     1x   2x   1x 1x   2x   1x   2x 2x   6x 6x   2x
import { Client } from './Client';
import { IOptions } from './Options';
 
let sharedClient: Client;
 
export function create(dsn: string, options?: IOptions) {
  return setSharedClient(new Client(dsn, options));
}
 
export function setSharedClient(client: Client) {
  sharedClient = client;
  return client;
}
 
export function getSharedClient() {
  return sharedClient;
}
 
export class SentryError implements Error {
  public name = 'SentryError';
  constructor(public message: string) {}
}