Here's a snippet of the procedure. The error is pointing to MyNotificationProcedure.
create procedure MyProc
as
begin try
-- SQL Code
;with MyRecursion
as
(
-- Anchor
union all
-- Recursion
)
select * from MyRecursion
-- SQL Code
return 0
end try
begin catch
exec MyNotificationProcedure @msg = 'Error in MyRecursion'
return -1
end catch
go