Comments
3 comments
-
Hi John,
This mirrors the behaviour of SQL Server.
Because the THROW is right after the ROLLBACK TRANSACTION, it thinks that THROW is the name of the transaction you want to rollback.
If you put a semicolon after ROLLBACK TRANSACTION, it should work as expected.
Best regards,
David -
Ahh. I was relying on the formatting to do that for me.
One ponders who would create a transaction called, "THROW", but then... -
Hi John,
It seems weird, but I feel that Prompt shouldn't make assumptions about what the writer meant.
There are however requests to add in static analysis rules (one request is here). A semicolon after ROLLBACK TRANSACTION could be shown as a hint.
Best regards,
David
Add comment
Please sign in to leave a comment.
version 7.1.0.112 (beta).
Basically "THROW;" gets placed into brackets.
If I reformat this:
I get this: