sql server - BEGIN-END inside BEGIN TRY- END TRY -


i try use begin-end liberally. there point in using contruct in context?:

begin try                begin           --do x          --do y        end  end try  begin catch     begin           --do z      end                                                  end catch; 

or safe use following?:

begin try                      --do x          --do y    end try  begin catch           --do z  end catch; 

a begin try ... end try block complete block in itself, there no point in having begin ... end inside it.

use begin ... end statements aren't blocks in themselves, example if:

if ... begin   ... end else begin   ... end 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -