forked from microsoft/vscode-node-debug2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.ts
More file actions
74 lines (64 loc) · 2.65 KB
/
Copy patherrors.ts
File metadata and controls
74 lines (64 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
import { DebugProtocol } from 'vscode-debugprotocol';
import * as nls from 'vscode-nls';
import { ErrorWithMessage } from 'vscode-chrome-debug-core/out/src/errors';
const localize = nls.loadMessageBundle();
export function runtimeNotFound(_runtime: string): DebugProtocol.Message {
return new ErrorWithMessage({
id: 2001,
format: localize('VSND2001', "Cannot find runtime '{0}' on PATH.", '{_runtime}'),
variables: { _runtime }
});
}
export function cannotLaunchInTerminal(_error: string): DebugProtocol.Message {
return new ErrorWithMessage({
id: 2011,
format: localize('VSND2011', 'Cannot launch debug target in terminal ({0}).', '{_error}'),
variables: { _error }
});
}
export function cannotLaunchDebugTarget(_error: string): DebugProtocol.Message {
return new ErrorWithMessage({
id: 2017,
format: localize('VSND2017', 'Cannot launch debug target ({0}).', '{_error}'),
variables: { _error },
showUser: true,
sendTelemetry: true
});
}
export function unknownConsoleType(consoleType: string): DebugProtocol.Message {
return new ErrorWithMessage({
id: 2028,
format: localize('VSND2028', "Unknown console type '{0}'.", consoleType)
});
}
export function cannotLaunchBecauseSourceMaps(programPath: string): DebugProtocol.Message {
return new ErrorWithMessage({
id: 2002,
format: localize('VSND2002', "Cannot launch program '{0}'; configuring source maps might help.", '{path}'),
variables: { path: programPath }
});
}
export function cannotLaunchBecauseOutFiles(programPath: string): DebugProtocol.Message {
return new ErrorWithMessage({
id: 2003,
format: localize('VSND2003', "Cannot launch program '{0}'; setting the '{1}' attribute might help.", '{path}', 'outFiles'),
variables: { path: programPath }
});
}
export function cannotLaunchBecauseJsNotFound(programPath: string): DebugProtocol.Message {
return new ErrorWithMessage({
id: 2009,
format: localize('VSND2009', "Cannot launch program '{0}' because corresponding JavaScript cannot be found.", '{path}'),
variables: { path: programPath }
});
}
export function cannotLoadEnvVarsFromFile(error: string): DebugProtocol.Message {
return new ErrorWithMessage({
id: 2029,
format: localize('VSND2029', "Can't load environment variables from file ({0}).", '{_error}'),
variables: { _error: error }
});
}