mranney/node_redis — pull request #361 by dainis (2013-01-04 20:58:12+00:00)
Title: Javascript parser swallows errors thrown in command callback

Looks like error is here : https://github.com/mranney/node_redis/blob/master/lib/parser/javascript.js#L213

This try/catch catches also errors thrown from callbacks, but error isn't thrown/emited to client

in case of pubsub message same message will go on for ever

```javascript
var redis = require('redis'),
r = redis.createClient(3052, '127.0.0.1'),
r2 = redis.createClient(3052, '127.0.0.1');

r.on('ready', function() {
r.subscribe('channel');

r.on('error', function(e){
console.log(e);
});

r.on('message', function(channel, data) {
console.log(channel, data);
throw new Error('test');
});
});

r2.on('ready', function() {
var i = 0;
console.log('r2');
(function p() {
r2.publish('channel', ++i);
setTimeout(p, 1000);
})()
});

```

output:
```
channel 2
channel 2
channel 2
...
```