Allow an empty Begin Try Catch Block - by D Parks

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 768625 Comments
Status Resolved Workarounds
Type Suggestion Repros 0
Opened 10/24/2012 2:54:04 PM
Access Restriction Public


while all other languages (i.e. c#, allow an empty code block in a try catch block, TSQL does not.
It would be very handy to allow empty code blocks.  SQL Server is not consistent.
For example, you can have an empty Begin Catch / End Catch, but not an empty Begin Try / End Try.

The following should be allowed:

Begin Try
  -- comments here
End Try
Begin Catch
End Catch

Keep in mind an empty Begin Catch is currently allowed.  It's just not consistent
Begin Catch
End Catch
Sign in to post a comment.