From cb254ae671732fc950950538d55790bce2497d5d Mon Sep 17 00:00:00 2001 From: Pavel Vasek Date: Thu, 15 Nov 2018 23:04:34 +0100 Subject: [PATCH] fix: better error message for non existing custom tsconfig #134 --- src/parser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parser.ts b/src/parser.ts index 66f48d41..cc7651ee 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -123,7 +123,8 @@ export function withCustomConfig( ); if (error !== undefined) { - throw error; + const errorText = `Cannot load custom tsconfig.json from provided path: ${tsconfigPath}, with error code: ${error.code}, message: ${error.messageText}`; + throw new Error(errorText); } const { options, errors } = ts.parseJsonConfigFileContent(