From 30cd357032601d5ee27195111a45a85b22717b1f Mon Sep 17 00:00:00 2001 From: monkingxue Date: Fri, 8 Jun 2018 00:22:28 +0800 Subject: [PATCH] [fix] revert runtime.ts --- runtime.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime.ts b/runtime.ts index 6232bd1cf1..6bc09dd89e 100644 --- a/runtime.ts +++ b/runtime.ts @@ -150,7 +150,8 @@ export function resolveModule( try { fetchResponse = os.codeFetch(moduleSpecifier, containingFile); } catch (e) { - throw Error(`Cannot find module '${containingFile}${moduleSpecifier}'`); + // TODO Only catch "no such file or directory" errors. Need error codes. + return null; } const { filename, sourceCode, outputCode } = fetchResponse; if (sourceCode.length === 0) {