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

better error when reading file

Gregg Tavares пре 6 година
родитељ
комит
9b10ee1465
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      build/js/build.js

+ 6 - 1
build/js/build.js

@@ -64,7 +64,12 @@ function mergeObjects() {
 }
 
 function readFile(fileName) {
-  return cache.readFileSync(fileName, 'utf-8');
+  try {
+    return cache.readFileSync(fileName, 'utf-8');
+  } catch (e) {
+    console.error('could not read:', fileName);
+    throw e;
+  }
 }
 
 function readHANSON(fileName) {

粤ICP备19079148号