build exception message automatically