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

Improve error handling: PDFs.

This commit is contained in:
hacksalot
2016-01-08 05:11:38 -05:00
parent 0246a5da19
commit 28c703daf7
3 changed files with 32 additions and 9 deletions

View File

@ -73,7 +73,8 @@ Error-handling routines for HackMyResume.
function get_error_msg( ex ) {
var msg = '', withStack = false;
var msg = '', withStack = false, isError = false;
switch( ex.fluenterror ) {
case HACKMYSTATUS.themeNotFound:
@ -137,6 +138,10 @@ Error-handling routines for HackMyResume.
});
break;
case HACKMYSTATUS.notOnPath:
msg = formatError( ex.engine + " wasn't found on your system path or is inaccessible. PDF not generated." );
break;
}
return {
msg: msg,
@ -144,6 +149,9 @@ Error-handling routines for HackMyResume.
};
}
function formatError( msg ) {
return chalk.red.bold( 'ERROR: ' + msg );
}
}());

View File

@ -19,7 +19,8 @@ Status codes for HackMyResume.
pdfgeneration: 9,
missingPackageJSON: 10,
invalid: 11,
invalidTarget: 12
invalidTarget: 12,
notOnPath: 13
};
}());