From 62c967526f1f783389245dbae6db7f9404c30ea9 Mon Sep 17 00:00:00 2001 From: hacksalot Date: Fri, 8 Jan 2016 18:15:12 -0500 Subject: [PATCH] Fix PDF exception glitch. --- src/generators/html-pdf-cli-generator.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/generators/html-pdf-cli-generator.js b/src/generators/html-pdf-cli-generator.js index 176ac2b..4552c28 100644 --- a/src/generators/html-pdf-cli-generator.js +++ b/src/generators/html-pdf-cli-generator.js @@ -47,8 +47,12 @@ Definition of the HtmlPdfCLIGenerator class. // { [Error: write EPIPE] code: 'EPIPE', errno: 'EPIPE', ... } // { [Error: ENOENT] } throw ( ex.inner && ex.inner.code === 'ENOENT' ) ? - { fluenterror: this.codes.notOnPath, engine: ex.cmd, stack: ex.inner.stack } : - { fluenterror: this.codes.pdfGeneration, inner: ex.inner, stack: ex.inner.stack }; + + { 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 }; } }