title: How to get ORA error code in C# exception?
body: <p>My code looks like this:</p>
  
  <pre><code>    public bool myQuery(string cmd)
      {
          try
          {
              OracleCommand command = null;
              command = new OracleCommand(cmd, sqlConnection);
              command.ExecuteReader();
          }
          catch (Exception ex)
          {
              MessageBox.Show(ex.Message, "error!");
              return false;
          }
          return true;            
      }
  </code></pre>
  
  <p>My issue is when error <code>ORA-02291</code> occurs in Oracle, its Exception is not caught. No error is shown, how do I catch this error ?</p>