aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 9224f28..e4f2c9e 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1605,7 +1605,10 @@ function catchHTMLError() {
return function (abort, cb) {
if (ended) return cb(ended)
read(abort, function (end, data) {
- if (!end || end === true) return cb(end, data)
+ if (!end || end === true) {
+ try { return cb(end, data) }
+ catch(e) { return console.trace(e) }
+ }
ended = true
cb(null, u.renderError(end).outerHTML)
})