June 11, 2015 at 8:09 pm
When using the THROW statement, is there a way of capturing the info so it can be written to a table?
June 12, 2015 at 6:36 am
Can you post the statement where you are using the THROW clause?
June 12, 2015 at 6:48 am
Sure, in the catch block before you THROW, use the ERROR_NUMBER(), ERROR_MESSAGE(), ERROR_PROCEDURE(), ERROR_SEVERITY() and ERROR_LINE() in an insert statement into the table of your choice.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 14, 2015 at 6:44 pm
Thanks Gail I'll give that a try.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply