Friendlier error messages plus a documentation comment for a function.