Check out example codes for "sql try statement". It will help you in understanding the concepts better.

Code Example 1

BEGIN TRY  
     { sql_statement | statement_block }  
END TRY  
BEGIN CATCH  
     [ { sql_statement | statement_block } ]  
END CATCH  
[ ; ]

Learn ReactJs, React Native from akashmittal.com