title: Show error message from PL/SQL procedure to the client
body: <p>I have a <code>try</code> block in my C# client which executes an Oracle PL/SQL stored procedure and a <code>catch</code> block using <code>Exception</code> class.</p>
  
  <p>In the stored procedure, if a particular condition is encountered during data processing, an exception is raised using <code>raise_application_error</code>.</p>
  
  <p><strong>Example:</strong> <code>raise_application_error(-20001, myErrMsg)</code></p>
  
  <p>I then want to catch this exception and show this particular message in the C# client as it is.</p>
  
  <p>And for all the other database related errors (e.g. constraint failure, connection errors) I want to catch and them show in my custom error message in the C# client.</p>
  
  <p>In my <code>catch</code> block, should I search for the string <code>ORA-20001</code> in the exception message string and then propagate it to the client as it is to determine if the above exception is being thrown from the procedure?</p>