Comments
3 comments
-
Hi Doug,
Thanks for your post, I can recreate the issue here and I'll look into a fix now. I think Prompt is (wrongly) assuming that the catch statement is going to be hit every time.
Thanks,
Aaron. -
I think I've got a fix for the issue in the latest 6.5 beta build which you can download from here.
Hopefully that fixes it for you, but if not just let me know!
Thanks,
Aaron. -
It is fixed in version 6.5.0.271 - fantastic job guys!
Ozzie
Add comment
Please sign in to leave a comment.
BEGIN
DECLARE -- User Friendly Constants
@Failed BIT = 1,
@Succeeded BIT = 0; -- This will say 'The value assigned here is never used'
DECLARE -- Derived Constants
@ExecutionStatus INT = @Succeeded;-- This will say 'The value assigned here is never used'
BEGIN TRY
...Code
END TRY
BEGIN CATCH
-- Handle the Error
SET @ExecutionStatus = @Failed; -- so if we fail - we are changing the value
EXECUTE dbo.usp_LogErrorInfo;
END CATCH
RETURN @ExecutionStatus; -- so we are either using the initially assigned value or the value assigned in the try/catch block
END