Fix remaining compatibility issues with exception handling.