1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-03 00:41:06 +01:00

Improve error handling.

This commit is contained in:
hacksalot
2016-01-20 19:59:36 -05:00
parent 57787f1bc7
commit f77cced7f3
5 changed files with 88 additions and 42 deletions

View File

@ -160,11 +160,13 @@ Implementation of the 'build' verb for HackMyResume.
}
function handleInternalError( ex ) {
console.log(ex);
}
/**
Generate a single target resume such as "out/rez.html" or "out/rez.doc".
TODO: Refactor.
@ -194,7 +196,6 @@ Implementation of the 'build' verb for HackMyResume.
function(fmt) { return fmt.name === targInfo.fmt.outFormat; })[0];
MKDIRP.sync( PATH.dirname( f ) ); // Ensure dest folder exists;
_opts.targets = finished;
_opts.errHandler = handleInternalError;
ret = theFormat.gen.generate( _rezObj, f, _opts );
}
//Otherwise this is an ad-hoc format (JSON, YML, or PNG) that every theme
@ -205,7 +206,6 @@ Implementation of the 'build' verb for HackMyResume.
})[0];
var outFolder = PATH.dirname( f );
MKDIRP.sync( outFolder ); // Ensure dest folder exists;
_opts.errHandler = handleInternalError;
ret = theFormat.gen.generate( _rezObj, f, _opts );
}
}