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:
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
}());
|
||||
|
@ -19,7 +19,8 @@ Status codes for HackMyResume.
|
||||
pdfgeneration: 9,
|
||||
missingPackageJSON: 10,
|
||||
invalid: 11,
|
||||
invalidTarget: 12
|
||||
invalidTarget: 12,
|
||||
notOnPath: 13
|
||||
};
|
||||
|
||||
}());
|
||||
|
Reference in New Issue
Block a user