A CATCH
clause that only rethrows the caught exception has the same effect as omitting the CATCH
altogether and letting
it bubble up automatically.
BEGIN TRY
SELECT 1/0;
END TRY
BEGIN CATCH -- Noncompliant
THROW;
END CATCH;
Such clauses should either be removed or populated with the appropriate logic.
SELECT 1/0;
or
BEGIN TRY
SELECT 1/0;
END TRY
BEGIN CATCH
EXECUTE usp_GetErrorInfo;
THROW;
END CATCH;