makes a constructor error message more informative