Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pass view error to user

  • Loading branch information...
commit 983f7d63b8460a04c159f6402b01ccbbb739dab6 1 parent 9f47cbf
Dominic Tarr authored
Showing with 9 additions and 5 deletions.
  1. +9 −5 lib/stream.js
14 lib/stream.js
View
@@ -20,11 +20,15 @@ module.exports = function (opener) {
})
} else if(Array.isArray(stream.meta)) {
//reduce the 10 most recently modified documents.
- opener.view.apply(null, stream.meta)
- .pipe(through(function (data) {
- this.queue(data)
- }))
- .pipe(stream)
+ try {
+ opener.view.apply(null, stream.meta)
+ .pipe(through(function (data) {
+ this.queue(data)
+ }))
+ .pipe(stream)
+ } catch (err) {
+ stream.error(err) //emit error on other end!
+ }
}
})
}
Please sign in to comment.
Something went wrong with that request. Please try again.