style changes. fix a problem where exception message is not generated properly