mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-10 07:47:07 +01:00
Start moving logging out of core.
This commit is contained in:
@ -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 };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,6 +169,7 @@ Definition of the TemplateGenerator class. TODO: Refactor
|
||||
{ outputFile: fileName, mk: file.data, opts: that.opts } );
|
||||
}
|
||||
catch(ex) {
|
||||
console.log(ex);
|
||||
require('../core/error-handler').err(ex, false);
|
||||
}
|
||||
}
|
||||
@ -179,6 +180,7 @@ Definition of the TemplateGenerator class. TODO: Refactor
|
||||
FS.copySync( file.info.path, thisFilePath );
|
||||
}
|
||||
catch(ex) {
|
||||
console.log('B');
|
||||
ex.showStack = true;
|
||||
require('../core/error-handler').err( ex );
|
||||
}
|
||||
|
Reference in New Issue
Block a user