1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-10 07:47:07 +01:00
This commit is contained in:
hacksalot
2016-01-21 23:40:15 -05:00
parent a935fe7dc2
commit 01c053702d
7 changed files with 48 additions and 9 deletions

View File

@ -198,7 +198,7 @@ Error-handling routines for HackMyResume.
case HMSTATUS.invalidHelperUse:
msg = printf( M2C( this.msgs.invalidHelperUse.msg ), ex.helper );
quit = false;
etype = 'error';
etype = 'warning';
break;
case HMSTATUS.notOnPath:
@ -226,10 +226,18 @@ Error-handling routines for HackMyResume.
break;
case HMSTATUS.compileTemplate:
//msg = printf( M2C( this.msgs.compileTemplate.msg ), ex.inner);
etype = 'error';
break;
case HMSTATUS.themeLoad:
msg = M2C( printf( this.msgs.themeLoad.msg, ex.attempted.toUpperCase() ), 'red');
if( ex.inner && ex.inner.fluenterror ) {
msg += M2C('\nError: ', 'red') + assembleError.call( this, ex.inner ).msg;
}
quit = true;
etype = 'custom';
break;
case HMSTATUS.parseError:
if( SyntaxErrorEx.is( ex.inner )) {
console.error( printf( M2C(this.msgs.readError.msg, 'red'), ex.file ) );

View File

@ -238,6 +238,7 @@ Definition of the `main` function.
var hand = require( './error' );
hand.init( _opts.debug, _opts.assert, _opts.silent );
var v = new HMR.verbs[ this.name() ]();
_opts.errHandler = v;
_out.init( _opts );
v.on( 'hmr:status', function() { _out.do.apply( _out, arguments ); });
v.on( 'hmr:error', function() {

View File

@ -81,7 +81,7 @@ errors:
parseError:
msg: Invalid or corrupt JSON on line %s column %s.
invalidHelperUse:
msg: Invalid use of the **%s** theme helper.
msg: Warning: Invalid use of the **%s** theme helper.
fileSaveError:
msg: An error occurred while writing %s to disk: %s.
mixedMerge:
@ -90,3 +90,5 @@ errors:
msg: "An error occurred during template invocation."
compileTemplate:
msg: "An error occurred during template compilation."
themeLoad:
msg: "Applying **%s** theme (? formats)"

View File

@ -107,7 +107,7 @@ Output routines for HackMyResume.
case HME.applyTheme:
this.theme = evt.theme;
var numFormats = Object.keys( evt.theme.formats ).length;
L( M2C(this.msgs.applyTheme.msg, 'green'),
L( M2C(this.msgs.applyTheme.msg, evt.status === 'error' ? 'red' : 'green'),
evt.theme.name.toUpperCase(),
numFormats, ( numFormats === 1 ? '' : 's') );
break;