1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-02 12:27:08 +01:00

Improve ENOENT handling.

This commit is contained in:
hacksalot
2016-01-07 16:13:09 -05:00
parent cb3488276d
commit a2723452c2
2 changed files with 10 additions and 5 deletions

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