diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-08-15 23:36:48 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-08-21 15:37:45 -0400 |
commit | 18d495c7d17cf3fce3835e732094d058f51eddaa (patch) | |
tree | f7244cfd83dbff9d8aaf67203feb0f3a24fe95f3 /js/runtime.ts | |
parent | cb1393cdaea4bfbee69efbf7ce86a4adfc4593b3 (diff) |
Better error handling in src/handlers.rs
Introduces error codes that are shared between JS/RS
Fixes #526.
Diffstat (limited to 'js/runtime.ts')
-rw-r--r-- | js/runtime.ts | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/js/runtime.ts b/js/runtime.ts index 1a9e8497d..93649e11c 100644 --- a/js/runtime.ts +++ b/js/runtime.ts @@ -176,14 +176,7 @@ export function resolveModule( } else { // We query Rust with a CodeFetch message. It will load the sourceCode, and // if there is any outputCode cached, will return that as well. - let fetchResponse; - try { - fetchResponse = os.codeFetch(moduleSpecifier, containingFile); - } catch (e) { - // TODO Only catch "no such file or directory" errors. Need error codes. - util.log("os.codeFetch error ignored", e.message); - return null; - } + const fetchResponse = os.codeFetch(moduleSpecifier, containingFile); filename = fetchResponse.filename; sourceCode = fetchResponse.sourceCode; outputCode = fetchResponse.outputCode; |