title: customize an error message in SQL server 2008 R2 on win 7
body: <p>I need to customize an error message in SQL server 2008 R2 (no support for throw) on win 7. </p>
  
  <pre><code>  BEGIN TRY
     DECLARE @result INT
     SET @result = LOG(-1)
    END TRY
  
   BEGIN CATCH
    EXEC sys.sp_addmessage 60000, 16, 'log() argument is not positive'
    RAISERROR (60000, 16, 1)
   END CATCH
  </code></pre>
  
  <p>But, the result is always the same : </p>
  
  <pre><code>An invalid floating point operation occurred.
  </code></pre>
  
  <p>Thanks</p>