title: THROW or RAISERROR for specific non-user defined error codes
body: <p>I'm trying to test some code that traps a specific error code in SQL server.  The error code is 7886.</p>
  
  <p>When I try to <code>THROW</code>, I get:</p>
  
  <pre><code>Error number 7886 in the THROW statement is outside the valid range. Specify an error number in the valid range of 50000 to 2147483647.
  </code></pre>
  
  <p>When I try to <code>RAISERROR</code>, I get:</p>
  
  <pre><code>Error number 7886 is invalid. The number must be from 13000 through 2147483647 and it cannot be 50000.
  </code></pre>
  
  <p><strong>Is there any way to raise an arbitrary error like this without actually setting up the situation to cause the error in the first place?</strong></p>