how to handle exception in sql server?
how to Handling exception in sql server using error code and return a formatted error to Application User Interface.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted May 2, 2013, 7:53 AM
hi,
you can use Try catch block to handle exception in SQL Server
with this you can you RaiseError to throw formatted error.
BEGIN TRY
--do you work
END TRY
BEGIN CATCH
RAISERROR ('your formated massage', 1, 1);
END CATCH
hope this will help you.