title: TRY and RAISERROR in T-SQL
body: <p>Having a small issue and wondering if I'm using these correctly.</p>
  
  <p>In my SQL script is have</p>
  
  <pre><code>BEGIN TRY
      // check some information and if there are certains errors
      RAISERROR ('Errors found, please fix these errors and retry', 1, 2) WITH SETERROR
  
      // Complete normal process if no errors encountered above
      PRINT 'IMPORT SUCCEEDED'
  END TRY
  BEGIN CATCH
      PRINT 'IMPORT ABORTED. ERRORS ENCOUNTERED'
  END CATCH
  </code></pre>
  
  <p>However, this is encountering an error and then continuing with the rest of the script. What am I missing? Thanks!</p>