Permalink
Browse files

fix missing callback bug and be more detailed with errors

  • Loading branch information...
brianshaler committed May 26, 2012
1 parent 9cec68d commit 945c3bfdf6e5f1c8a1ad4e6a4845af9aee22af3d
Showing with 7 additions and 1 deletion.
  1. +7 −1 controllers/TwitterController.js
@@ -148,14 +148,20 @@ exports.controller = function(req, res, next) {
if (data && data.friends && data.friends.length > 0) { return; }
if (data && data.text && data.user && data.user.screen_name) {
//console.log("new tweet from: @"+data.user.screen_name);
- process_tweet(data);
+ try {
+ process_tweet(data, function () { });
+ } catch (e)
+ {
+ throw e;
+ }
return;
}
//console.log(util.inspect(data));
});
stream.on('error', function(error) {
console.log("stream.error");
console.log(error);
+ console.log(error.stack);
attr.connected = false;
streaming = false;
try {

0 comments on commit 945c3bf

Please sign in to comment.