From 4b99e432d63e7a0ce8ad8d2184232417853bfd2b Mon Sep 17 00:00:00 2001 From: eric thul Date: Sat, 5 Nov 2016 14:01:18 -0400 Subject: Wrapping reject values in Error objects --- src/Psc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Psc.js') diff --git a/src/Psc.js b/src/Psc.js index 3901eca..5954944 100644 --- a/src/Psc.js +++ b/src/Psc.js @@ -41,7 +41,7 @@ function compile(psModule) { cache.compilationFinished = true if (code !== 0) { cache.errors = stderr.join('') - reject(true) + reject(new Error('compilation failed')) } else { cache.warnings = stderr.join('') resolve(psModule) @@ -83,7 +83,7 @@ function bundle(options, cache) { compilation.on('close', code => { if (code !== 0) { cache.errors = (cache.errors || '') + stderr.join('') - return reject(true) + return reject(new Error('bundling failed')) } cache.bundle = stderr resolve(fs.appendFileAsync(options.bundleOutput, `module.exports = ${options.bundleNamespace}`)) -- cgit v1.2.3