friendlier error message for bad code