-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathdebug.ios.ts
More file actions
22 lines (20 loc) · 732 Bytes
/
debug.ios.ts
File metadata and controls
22 lines (20 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Source } from "./debug-common";
export * from "./debug-common";
export class ScopeError extends Error {
constructor(inner: Error, message?: string) {
let formattedMessage;
if (message && inner.message) {
formattedMessage = message + "\n > " + inner.message.replace("\n", "\n ");
} else {
formattedMessage = message || inner.message || undefined;
}
super(formattedMessage);
this.stack = inner.stack;
this.message = formattedMessage;
}
}
export class SourceError extends ScopeError {
constructor(child: Error, source: Source, message?: string) {
super(child, message ? message + " @" + source + "" : source + "");
}
}