Properly convert exceptions.