H
hansiman
I'm wondering how best to present exception messages to a user.
In a try catch I catch an OleDb.OleDbException. The error could be a
COLUMN REFERENCE constraint error (by a deletion attempt).
The normal user would not know what to make of the standard error
message (exOleDb.Message) and I'm not sure how best to use the the
exOleDb.ErrorCode (-2147217873)?
Is best practise to present the user to a general message like "An SQL
Server Error Occurred: " and include the exOleDb.Message? or is it
better to search the exOleDb.Message for key words and then present
the user with an understandable error message ("you can't delete x
because x is used somewhere else, bla bla bla")?
In a try catch I catch an OleDb.OleDbException. The error could be a
COLUMN REFERENCE constraint error (by a deletion attempt).
The normal user would not know what to make of the standard error
message (exOleDb.Message) and I'm not sure how best to use the the
exOleDb.ErrorCode (-2147217873)?
Is best practise to present the user to a general message like "An SQL
Server Error Occurred: " and include the exOleDb.Message? or is it
better to search the exOleDb.Message for key words and then present
the user with an understandable error message ("you can't delete x
because x is used somewhere else, bla bla bla")?