Include fewer paths in exception

It's sufficient to append them to the log.
This commit is contained in:
Andrew Casey 2019-08-09 10:27:02 -07:00
parent b24050aefd
commit d9780cd7ba

View File

@ -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;
}