Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot get Try Catch to handle error
Message
De
03/04/2008 11:28:41
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Cannot get Try Catch to handle error
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01307868
Message ID:
01307868
Vues:
65
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform