Correctly handle new-style exceptions