Converts to new style exception handling