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

Better dynamic font handling.

This commit is contained in:
hacksalot
2016-01-22 22:19:28 -05:00
parent ac9e4aa1a0
commit f073c79b8d
4 changed files with 102 additions and 21 deletions

View File

@ -18,6 +18,7 @@ Error-handling routines for HackMyResume.
, WRAP = require('word-wrap')
, M2C = require('../utils/md2chalk.js')
, chalk = require('chalk')
, extend = require('extend')
, YAML = require('yamljs')
, printf = require('printf')
, SyntaxErrorEx = require('../utils/syntax-error-ex');
@ -195,10 +196,15 @@ Error-handling routines for HackMyResume.
}, this);
break;
case HMSTATUS.missingParam:
msg = printf( M2C( this.msgs.missingParam.msg ), ex.expected, ex.helper );
break;
case HMSTATUS.invalidHelperUse:
msg = printf( M2C( this.msgs.invalidHelperUse.msg ), ex.helper );
if( ex.error ) {
msg += printf( '\n--> ' + M2C( this.msgs.invalidParamCount.msg ), ex.expected );
msg += '\n--> ' + assembleError.call( this, extend( true, {}, ex, {fluenterror: ex.error} )).msg;
//msg += printf( '\n--> ' + M2C( this.msgs.invalidParamCount.msg ), ex.expected );
}
quit = false;
etype = 'warning';

View File

@ -94,3 +94,5 @@ errors:
msg: "Applying **%s** theme (? formats)"
invalidParamCount:
msg: "Invalid number of parameters. Expected: **%s**."
missingParam:
msg: The '**%s**' parameter was needed but not supplied.