Clean up exception handling.