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?