New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TSQL: TRY/CATCH #2044
TSQL: TRY/CATCH #2044
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2044 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 148 148
Lines 10495 10499 +4
=========================================
+ Hits 10495 10499 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpers36 just a couple questions to check, but otherwise looking good 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding adding this @jpers36, looks great! LGTM 🚀
Fixes #1541
Adding TRY/CATCH logic to TSQL. This block pair allows for exceptions to be caught and handled within TSQL. Added a test case as well.
As part of this change, I tweaked the way that BeginEndSegment is used. BeginEndSegment was always referenced as an alternative to StatementSegment and vice versa, so I collapsed BeginEndSegment into StatementSegment. This was to simplify TRY/CATCH's implementation, which is very similar to BeginEndSegment. This caused trivial changes to a few BEGIN/END test cases.