Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot get Try Catch to handle error
Message
From
04/04/2008 20:48:11
 
 
To
03/04/2008 11:28:41
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01307868
Message ID:
01308359
Views:
11
This is strange Michel ... it should have caught the error. Could it be that it's erroring out elsewhere? I mean, something *is* catching an error, so I'm betting it's not occurring in this particular spot.

~~Bonnie




>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?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform