mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-12 01:48:33 -05:00
Include fewer paths in exception
It's sufficient to append them to the log.
This commit is contained in:
@@ -1158,7 +1158,7 @@ namespace ts {
|
||||
function getValidSourceFile(fileName: string): SourceFile {
|
||||
const sourceFile = program.getSourceFile(fileName);
|
||||
if (!sourceFile) {
|
||||
throw new Error(`Could not find sourceFile: '${fileName}' in ${program && JSON.stringify(program.getSourceFiles().map(f => f.fileName))}.`);
|
||||
throw new Error(`Could not find sourceFile: '${fileName}'.`);
|
||||
}
|
||||
return sourceFile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user