New answers tagged

2

In addition to the types of errors noted by @Aaron (i.e. Severity >= 19 and conversion failures), the following types of errors, noted in the MSDN page for TRY...CATCH, will also abort a batch: The following types of errors are not handled by a CATCH block when they occur at the same level of execution as the TRY…CATCH construct: Compile errors, ...


5

I believe there are a few exceptions, but from Database Engine Error Severities (MSDN): Error messages with a severity level of 19 or higher stop the execution of the current batch. Errors that terminate the database connection, usually with severity from 20 through 25, are not handled by the CATCH block because execution is aborted when the ...



Top 50 recent answers are included