1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-15 10:07:07 +01:00

Catch JSON syntax errors for all commands.

...and emit line/column info.
This commit is contained in:
hacksalot
2016-01-01 17:20:42 -05:00
parent 8c8dbfed72
commit 13fc903b2b
5 changed files with 49 additions and 20 deletions

View File

@ -23,7 +23,7 @@ Implementation of the 'convert' verb for HackMyResume.
if( sources && dst && sources.length && dst.length && sources.length !== dst.length ) {
throw { fluenterror: 7 };
}
var sourceResumes = ResumeFactory.load( sources, _log, null, true );
var sourceResumes = ResumeFactory.load( sources, { log: _log, format: null, objectify: true, throw: true } );
sourceResumes.forEach(function( src, idx ) {
var sheet = src.rez;
var sourceFormat = ((sheet.basics && sheet.basics.imp) || sheet.imp).orgFormat === 'JRS' ? 'JRS' : 'FRESH';