Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Practical examples of Try/Catch/Finally
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00836428
Message ID:
00836466
Views:
18
>In the couple of examples I ran, the e.Message does not really point to to the cause of the problem.
>
>For example, when failing to create a connection object to VfpOleDb the error message is "One or more accessor flags were invalid".
>
>Do you find, in your work, that e.Message provides information user can use?

Yea,
But you may want to add to it when you log it.
For example In addition to the e.message text I may add the value of a few properties that are integral to my method. For example, I think I added the SQL Command there as an extra. When it’s text I get the whole text and when an SP I get the name.


Here is a sample message from my error log in my data class.
Begin Exception 9/17/2003 2:32:21 PM
System.Data
   at System.Data.SqlClient.SqlConnection.Open()
   at OscContactManagementDataLogic.OscContactManagmentDataLogicBaseClass.GetDataSetSQL(String sDataSetName) in d:\dev\osccontactmanager\datalogic.cs:line 565
The ConnectionString property has not been initialized.
SQL Command: sp_TTGetHighJobNumberTransLation
End Exception
I think that you may want to log a few other things instead of just relying on the “Message”
Chris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform