1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-06-30 23:51:05 +01:00

Start moving logging out of core.

This commit is contained in:
hacksalot
2016-01-09 13:58:47 -05:00
parent d77b484e55
commit 732bc9809a
8 changed files with 263 additions and 91 deletions

View File

@ -40,19 +40,17 @@ Definition of the HtmlPdfCLIGenerator class.
try {
var safe_eng = info.opts.pdf || 'wkhtmltopdf';
engines[ safe_eng ].call( this, info.mk, info.outputFile );
if( safe_eng !== 'none' )
engines[ safe_eng ].call( this, info.mk, info.outputFile );
return null; // halt further processing
}
catch(ex) {
// { [Error: write EPIPE] code: 'EPIPE', errno: 'EPIPE', ... }
// { [Error: ENOENT] }
throw ( ex.inner && ex.inner.code === 'ENOENT' ) ?
{ fluenterror: this.codes.notOnPath, inner: ex.inner, engine: ex.cmd,
stack: ex.inner && ex.inner.stack } :
{ fluenterror: this.codes.pdfGeneration, inner: ex.inner,
stack: ex.inner && ex.inner.stack };
{ fluenterror: this.codes.pdfGeneration, inner: ex, stack: ex.stack };
}
}