Correct exception handling.

Update exception message handling to a workable method.