Преглед изворни кода

Handle module reading/compilation errors separately from IMPORT errors

Report both low-level details ("file cannot be read" etc) and general IMPORT error (line <N>: module(s) not found: <MODULE>).
Vladislav Folts пре 4 година
родитељ
комит
7931464e14
2 измењених фајлова са 3 додато и 0 уклоњено
  1. BIN
      bin/compiled.zip
  2. 3 0
      src/oc.js

+ 3 - 0
src/oc.js

@@ -101,6 +101,9 @@ var ModuleResolver = Class.extend({
             try {
                 this.compile(this.__moduleReader(name));
             }
+            catch (x) {
+                this.__handleErrors(x + "");
+            }
             finally {
                 this.__detectRecursion.pop();
             }