Add top-level exception handler