blob: a5b8a7a9907f7c0d7f60d6d1b2c45ddad6cf3835 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
export type TransformErrorOptions = {
transform?: string;
fatal?: boolean;
};
export class TransformError extends Error {
public transform: string;
public fatal: boolean;
constructor(message: string, opts?: TransformErrorOptions) {
super(message);
this.name = "TransformError";
this.transform = opts?.transform ?? "unknown";
this.fatal = opts?.fatal ?? true;
Error.captureStackTrace(this, TransformError);
}
}
|