Better error catching and print when connecting.

This commit is contained in:
Jeremy Fincher 2004-08-25 05:08:27 +00:00
parent e4d77f4285
commit 6b72890679

View File

@ -45,6 +45,7 @@ import imp
import sre
import sys
import getopt
import socket
import logging
import linecache
@ -194,7 +195,10 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
for network in conf.supybot.networks():
try:
self._connect(network)
except socket.error, e:
self.log.error('Could not connect to %s: %s.', network, e)
except Exception, e:
self.log.exception('Exception connecting to %s:', network)
self.log.error('Could not connect to %s: %s.', network, e)
# Setup plugins and default plugins for commands.
for (name, s) in registry._cache.iteritems():