Don't raise bare Exception, use a more appropriate exception subclass.  Fixed most instances of this problem, a couple of them I wasn't sure so I left them in place.