Improve ENOENT handling.

This commit is contained in:
hacksalot committed 2016-01-07 16:13:09 -05:00
1 parent cb3488276d
commit a2723452c2
2 files changed
+10 -5

No files matched your search

+4 -2
View File
@@ -116,8 +116,10 @@ Definition of the ResumeFactory class.
ex.handled = true;
}
if( opts.throw ) throw ex;
else return {
// FS.readFileSync failed
if( !rawData || opts.throw ) throw ex;
return {
error: ex,
raw: rawData,
file: fileName