try:
status = self.twitter.PostUpdate(msg)
except Exception, e:
- print "Error posting to twitter: %s" % e
+ print "Error posting to twitter (post %s): %s" % (post[0], e)
# We'll just try again with the next one
continue
ret=instream.read()
instream.close()
except Exception, e:
- raise "Failed in call to tr.im API: %s" % e
+ raise Exception("Failed in call to tr.im API: %s" % e)
if len(ret)==0:
raise "tr.im returned blank!"
trim = json.loads(ret)
return trim['url']
except Exception, e:
- raise "Failed to JSON parse tr.im response: %s" % e
+ raise Exception("Failed to JSON parse tr.im response: %s" % e)
if __name__=="__main__":