Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

How to Handle This Exception

$
0
0
Dear Friends

I am trying to use EXCEPTION HANDLING for the first time. I have used the following code in my program:

        Dim checkvalue As Boolean = False
        Try
            checkvalue = SaveImOrder()
            checkvalue = SaveImOrderDetails()
        Catch ex As Exception When checkvalue = False
            Exit Sub
        End Try
        (Rest of the code)



In above mentioned functions I am actually saving records in tables and in case of any error returning "FALSE" back here ... Then I need to catch this FALSE value to exit SUB .... However the code is not working and I am unable to track my mistake .. Please help or advice something better

Best Regards

ZEE

Viewing all articles
Browse latest Browse all 51036

Trending Articles



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