When a UDF is invoked through a SELECT or other statement and error occurs, and you
trap this error in a CATCH block, error_line and error_procedure relates to the batch that fired the statement, not to the UDF. This makes troubleshooting more difficult.
When you execute a UDF through EXEC, error_line and error_procedure are accurate.
Obviously, I don't expect this behaviour for inline functions, only multi-statement functions.
I reckon that the current behaviour may be "by design", why it would have been more appropriate to file this as a suggestion. In any case, I don't really expect this change in SQL 2008.