diff options
Diffstat (limited to 'src/Psc.js')
-rw-r--r-- | src/Psc.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -41,7 +41,7 @@ function compile(psModule) { | |||
41 | cache.compilationFinished = true | 41 | cache.compilationFinished = true |
42 | if (code !== 0) { | 42 | if (code !== 0) { |
43 | cache.errors = stderr.join('') | 43 | cache.errors = stderr.join('') |
44 | reject(true) | 44 | reject(new Error('compilation failed')) |
45 | } else { | 45 | } else { |
46 | cache.warnings = stderr.join('') | 46 | cache.warnings = stderr.join('') |
47 | resolve(psModule) | 47 | resolve(psModule) |
@@ -83,7 +83,7 @@ function bundle(options, cache) { | |||
83 | compilation.on('close', code => { | 83 | compilation.on('close', code => { |
84 | if (code !== 0) { | 84 | if (code !== 0) { |
85 | cache.errors = (cache.errors || '') + stderr.join('') | 85 | cache.errors = (cache.errors || '') + stderr.join('') |
86 | return reject(true) | 86 | return reject(new Error('bundling failed')) |
87 | } | 87 | } |
88 | cache.bundle = stderr | 88 | cache.bundle = stderr |
89 | resolve(fs.appendFileAsync(options.bundleOutput, `module.exports = ${options.bundleNamespace}`)) | 89 | resolve(fs.appendFileAsync(options.bundleOutput, `module.exports = ${options.bundleNamespace}`)) |