title: SQL Server Raiserror not causing exception in .NET client
body: <p>I have a stored procedure on a SQL Server 2005 database which has a statement like this:</p>
  
  <pre><code>  IF @Condition = 0
      BEGIN
          RAISERROR('some error message',16,1)
          RETURN
      END
  </code></pre>
  
  <p>and it's called from a C# client like so:</p>
  
  <pre><code> try
             {
                  SomeVariable = SqlHelper.ExecuteScalar(GetConnectionString(), "MySP", new object[] { param1, param2});
              }
              catch (SqlException e)
              {
                  Console.WriteLine(e.Message);
              }
  </code></pre>
  
  <p>However there's no exception being raised. The condition in the SP is always true for testing. To verify this, I copied the call from SQL Server Profiler and executed it in a query window and the ErrorMessage was printed which means the error is raised. </p>
  
  <p>Not sure what's happening.</p>