Re-implement OpenMP exception catching.