catch urllib2 exceptions