What are the new error handling commands introduced with SQL Server 2005 and beyond?

Technology CommunityCategory: T-SQLWhat are the new error handling commands introduced with SQL Server 2005 and beyond?
VietMX Staff asked 3 years ago
  • The new commands are TRY and CATCH.
  • Although they do not directly replace any specific command, in many respects the TRY and CATCH has been used over the RAISERROR command.
  • The TRY block is for the business logic and the CATCH logic is for capturing the error.