automatic exception formatting