Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 38x 14x 1x 13x 38x 43x 43x 38x 38x 3x | export const getErrorOrThrow = (err: unknown): Error|SiError => {
if (!(err instanceof Error) && !(err instanceof SiError)) {
throw new Error('Thrown thing is not an error');
}
return err;
};
export class SiError {
constructor(
public message: string = '',
public stack = [],
) {}
}
export class NotImplementedError extends SiError {}
export const notImplemented = (message?: string): never => {
throw new NotImplementedError(message || 'Not implemented');
};
|