title: What is the severity level of the error when a table is missing in SQL server? How can I capture the error in a catch block and return the severity?
body: <p>Here's my code snippet:</p>
  
  <pre><code>CREATE OR ALTER PROC abc 
  AS
  BEGIN
  BEGIN TRY
  /* write an insert to a table that does not exist*/ 
  insert into xyz select 1
  END TRY
  BEGIN CATCH
  RAISE ERROR( 'dsd',16,1)
  END CATCH
  END
  </code></pre>
  
  <p>Now a missing DB object has a severity 11 according to this article :<a href="https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-error-severities?view=sql-server-2017" rel="nofollow noreferrer">MSDN reference SQL error severity</a></p>
  
  <p>So why isnt it caught? If I replace the insert with a divide by 0 scenario, the raise error that I have is being triggered. Also, how can I return the ERROR_SEVERITY() as an output parameter? </p>