>It's covered in BOL. Excerpt:
>
>ERROR_NUMBER() returns the number of the error.
>ERROR_SEVERITY() returns the severity.
>ERROR_STATE() returns the error state number.
>ERROR_PROCEDURE() returns the name of the stored procedure or trigger where the error occurred.
>ERROR_LINE() returns the line number inside the routine that caused the error.
>ERROR_MESSAGE() returns the complete text of the error message. The text includes the values supplied for any substitutable parameters, such as lengths, object names, or times.
Thanks, this works.