Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot get Try Catch to handle error
Message
From
03/04/2008 11:28:41
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Cannot get Try Catch to handle error
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01307868
Message ID:
01307868
Views:
66
I have an error that happens on a very rare occasion which I am trying to catch. It happens when using the Convert.FromBase64String() method. I have this:
            Try

                ' Set the Initialization Vector
                dec.IV = Convert.FromBase64String(initVector)

            Catch loError As Exception

                ' Get the proper definition as per the current scope
                ' This is used for debugging purposes. We have the value received. So, if there is
                ' an error in this method, we know what the value was.
                If oProcess Is Nothing Then
                    oApp.ErrorSetupControlledByTheFramework("Unable to decrypt (II). " + _
                     "The message is: " + loError.Message + " The value is: " + data)
                Else
                    oProcess.ErrorSetupControlledByTheFramework("Unable to decrypt (II). " + _
                     "The message is: " + loError.Message + " The value is: " + data)
                End If

            End Try
Recently, I added the Try Catch in there so to log in my Error table the value of data which is a parameter received. So, I thought the next time this would happen, I would know what it was trying to decrypt. But, to my big surprise, I just found that we had the situation again a few minutes ago and that the only thing I have is this message:

"Invalid length for a Base-64 char array."

So, I just cannot understand why it doesn't go into my error log. Is there something with the Convert class that when an error occurs, it will bypass it?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform