Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Cobol .Net Exception Handling

$
0
0

Never mind, I figured it out.  It is truly the exception "object reference not set..."   I am testing my Try Catch statement with several different exception types.  In this particular case, my database connection string was incorrect.  

However, if I try to use

Catch mysqlex as type MySqlException

then it does not go to the catch but stops at the Try statement where it tries to open the connection.  If I specify the type as MySqlException then why doesn't it fall to the catch?  I have used this type of Catch before in C# code, but instead of MySqlException it was the SQLException handling type.

Thoughts?


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>