Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/core/lib/InjectedScriptError.ts
1029 views
1
import { IPathStep } from 'awaited-dom/base/AwaitedPath';
2
3
export default class InjectedScriptError extends Error {
4
private readonly pathState: { step: IPathStep; index: number };
5
constructor(message: string, pathState?: { step: IPathStep; index: number }) {
6
super(message);
7
this.pathState = pathState;
8
this.name = 'InjectedScriptError';
9
}
10
11
public toJSON(): object {
12
return {
13
message: this.message,
14
pathState: this.pathState,
15
};
16
}
17
}
18
19