Skip to content

Commit 816e7b0

Browse files
authored
Merge pull request #32789 from amcasey/FileNotFoundError
Correct string template
2 parents a02735e + 8c6612b commit 816e7b0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/server/session.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ namespace ts.server {
713713

714714

715715
if (err.ProgramFiles) {
716-
msg += `\n\nProgram files: {JSON.stringify(error.ProgramFiles}}\n`;
716+
msg += `\n\nProgram files: ${JSON.stringify(err.ProgramFiles)}\n`;
717717
msg += `\n\nProjects::\n`;
718718
let counter = 0;
719719
const addProjectInfo = (project: Project) => {

src/services/services.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ namespace ts {
11581158
function getValidSourceFile(fileName: string): SourceFile {
11591159
const sourceFile = program.getSourceFile(fileName);
11601160
if (!sourceFile) {
1161-
const error: Error & PossibleProgramFileInfo = new Error(`Could not find sourceFile: '${fileName}'.`);
1161+
const error: Error & PossibleProgramFileInfo = new Error(`Could not find source file: '${fileName}'.`);
11621162

11631163
// We've been having trouble debugging this, so attach sidecar data for the tsserver log.
11641164
// See https://github.com/microsoft/TypeScript/issues/30180.

src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ namespace ts.projectSystem {
139139
assert.isTrue(false, `should not find file '${imported.path}'`);
140140
}
141141
catch (e) {
142-
assert.isTrue(e.message.indexOf(`Could not find sourceFile: '${imported.path}'.`) === 0, `Actual: ${e.message}`);
142+
assert.isTrue(e.message.indexOf(`Could not find source file: '${imported.path}'.`) === 0, `Actual: ${e.message}`);
143143
}
144144
const f2Lookups = getLocationsForModuleLookup("f2");
145145
callsTrackingHost.verifyCalledOnEachEntryNTimes(CalledMapsWithSingleArg.fileExists, f2Lookups, 1);

0 commit comments

Comments
 (0)