Added exception message formatting.