aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Psc.js
diff options
context:
space:
mode:
authoreric <thul.eric@gmail.com>2017-02-25 10:30:44 -0500
committerGitHub <noreply@github.com>2017-02-25 10:30:44 -0500
commit936a04b591f649dbff2a65bbbd291913fc42502d (patch)
treeb426fce8d295591d60ce94c54a157a324e100ffb /src/Psc.js
parenta3c358f80f8197d5a1d05e42916cd5593b5b2dd5 (diff)
parent806d2915e6579d3dce38de8f2b40b85466ceda05 (diff)
downloadpurs-loader-936a04b591f649dbff2a65bbbd291913fc42502d.tar.gz
purs-loader-936a04b591f649dbff2a65bbbd291913fc42502d.tar.zst
purs-loader-936a04b591f649dbff2a65bbbd291913fc42502d.zip
Merge pull request #84 from ethul/topic/error-handling
Topic/error handling
Diffstat (limited to 'src/Psc.js')
-rw-r--r--src/Psc.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Psc.js b/src/Psc.js
index 4991d5f..ffa32b7 100644
--- a/src/Psc.js
+++ b/src/Psc.js
@@ -45,7 +45,12 @@ function compile(psModule) {
45 if (errorMessage.length) { 45 if (errorMessage.length) {
46 psModule.emitError(errorMessage); 46 psModule.emitError(errorMessage);
47 } 47 }
48 reject(new Error('compilation failed')) 48 if (options.watch) {
49 resolve(psModule);
50 }
51 else {
52 reject(new Error('compilation failed'))
53 }
49 } else { 54 } else {
50 const warningMessage = stderr.join(''); 55 const warningMessage = stderr.join('');
51 if (options.warnings && warningMessage.length) { 56 if (options.warnings && warningMessage.length) {