Exception handling

A bit of large-scale (read: hamfisted) exception handling to prevent
fringe cases from taking down the whole bot.