confess on all redis errors
[MQR.git] / scripts / mqr-xmpp-client.pl
index ba191c2..64d4d65 100755 (executable)
@@ -10,6 +10,7 @@ use AnyEvent::XMPP::Namespaces qw/xmpp_ns/;
 use AnyEvent::Redis;
 use Data::Dump qw(dump);
 use Encode;
+use Carp qw(confess);
 
 binmode STDOUT, ":utf8";
 
@@ -29,8 +30,8 @@ $cl->set_presence(undef, 'I\'m a talking bot.', 1);
 $cl->add_account ($jid, $pw);
 warn "connecting to $jid...\n";
 
-my $pub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT}, on_error => sub { warn @_ } );
-my $sub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT}, on_error => sub { warn @_ } );
+my $pub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT}, on_error => sub { confess @_ } );
+my $sub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT}, on_error => sub { confess @_ } );
 
 our $contacts;