From 1968143abed8eea819c02631dee2f843241c4a82 Mon Sep 17 00:00:00 2001 From: Hangyeol Jeong Date: Fri, 3 Nov 2023 11:33:43 +0900 Subject: [PATCH 1/2] Enhance error logging for file not found exceptions --- src/typescript.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/typescript.ts b/src/typescript.ts index fd60a798..5a9b2da6 100644 --- a/src/typescript.ts +++ b/src/typescript.ts @@ -66,7 +66,7 @@ export function extractFileNames(cwd: string, provider: string, functions?: { [k // Can't find the files. Watch will have an exception anyway. So throw one with error. console.log(`Cannot locate handler - ${fileName} not found`) - throw new Error('Typescript compilation failed. Please ensure handlers exists with ext .ts or .js') + throw new Error(`Typescript compilation failed. Please ensure ${fileName} exists with ext .ts or .js`); }) } From ef28a2b1906fd6983b9066d457617c51a34a3e30 Mon Sep 17 00:00:00 2001 From: Hangyeol Jeong Date: Fri, 3 Nov 2023 11:38:02 +0900 Subject: [PATCH 2/2] delete file not found exceptions console.log --- src/typescript.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/typescript.ts b/src/typescript.ts index 5a9b2da6..b298b633 100644 --- a/src/typescript.ts +++ b/src/typescript.ts @@ -65,7 +65,6 @@ export function extractFileNames(cwd: string, provider: string, functions?: { [k } // Can't find the files. Watch will have an exception anyway. So throw one with error. - console.log(`Cannot locate handler - ${fileName} not found`) throw new Error(`Typescript compilation failed. Please ensure ${fileName} exists with ext .ts or .js`); }) }