Hello:
I have a simple try/catch block
try
{
// Open the connection
_connection.Open(); // [1]
}
catch( OracleException ex ) // [2]
{
// Handle the exception
int x = ex.ErrorCode;
}
The catch is never executed and the runtime reports 'OracleException was unhandled' at [1] which just makes my head spin. Clearly, I have a catch statement for the associated exception type. I've even tried the fully qualified type, Oracle.DataAccess.Client.OracleException at [2] and still the exception is unhandled.
The only way I can actually get the catch to work is by catching System.Exception at [2]. What is causing this odd behavior?