Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling and exception message
Message
From
16/11/2003 13:43:34
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Error handling and exception message
Miscellaneous
Thread ID:
00850464
Message ID:
00850464
Views:
55
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
Next
Reply
Map
View

Click here to load this message in the networking platform