Fix exception message handling.