Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error handling and exception message
Message
De
16/11/2003 13:43:34
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Error handling and exception message
Divers
Thread ID:
00850464
Message ID:
00850464
Vues:
54
I have an error handling to detect for a specific message. What I don't understand is why I have to remove the last three characters in order to have a recognition of the text I am looking for:
      Catch loError As Exception
         lcError = loError.Message
         lcError = Mid(lcError, 1, lcError.Length - 3)
         Select Case lcError
            Case "Bad Data"
               lcError = "You didn't encrypt the XML string with a valid key."
         End Select
         Return lcError
      End Try
It seems that a dot, a carriage return and another character are by default returned when an exception occurs. Is there a reason for that?
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