aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-04-10 16:11:38 -0400
committercel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-04-10 16:11:50 -0400
commitc87ebee6a707d1031fedf2247b440e6aab04332d (patch)
treef3374f1e7fd296993cb81434de6545bbb13dec86
parent5d4513fd970a0b39e368787e01c6b989827f1d17 (diff)
downloadpatchfoo-c87ebee6a707d1031fedf2247b440e6aab04332d.tar.gz
patchfoo-c87ebee6a707d1031fedf2247b440e6aab04332d.zip
Less errors
-rw-r--r--lib/contacts.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/contacts.js b/lib/contacts.js
index 39e8cee..3d3cec9 100644
--- a/lib/contacts.js
+++ b/lib/contacts.js
@@ -160,11 +160,15 @@ Contacts.prototype.createContactStreams = function (opts) {
var blockers = defer.source()
var enemies = defer.source()
var friends = this.createFriendsStream(opts, function (err, more) {
- follows.resolve(err ? pull.error(err) : pull.values(more.follows))
- followers.resolve(err ? pull.error(err) : pull.values(more.followers))
- blocks.resolve(err ? pull.error(err) : pull.values(more.blocks))
- blockers.resolve(err ? pull.error(err) : pull.values(more.blockers))
- enemies.resolve(err ? pull.error(err) : pull.values(more.enemies))
+ try {
+ follows.resolve(err ? pull.error(err) : pull.values(more.follows))
+ followers.resolve(err ? pull.error(err) : pull.values(more.followers))
+ blocks.resolve(err ? pull.error(err) : pull.values(more.blocks))
+ blockers.resolve(err ? pull.error(err) : pull.values(more.blockers))
+ enemies.resolve(err ? pull.error(err) : pull.values(more.enemies))
+ } catch(e) {
+ console.trace(e)
+ }
})
return {
friends: friends,