I would recommend creating an error handling component with optional logging available. The logging should be able to be turned on either through the config file, command line parameters or an options menu, depending on your target audience and how much you want to be involved.
Secondly, one solution I implemented when I was getting cryptic error messages returned was to create a stored procedure in SQL Server which queried a table for a user-friendly error message.
The table contained a user friendly error message and a error message pattern which would filter out factors like line number, etc.
The pattern would utilize the database wild card character for filtering messages. For example: :"%Order%not found%"
The meat of the stored procedure is:
SET @RtnMsg = (SELECT TOP 1 SFCErrorMessage FROM SAPErrorMsg WHERE @Message LIKE SAPPattern)
SET @RtnMsg = IsNull(@RtnMsg , @Message)
Finally, I am sure that you are aware that you can supply a default error handler in your application in the App.xaml.cs (or App.xaml.vb) file. I would urge you to only use this for unhandled errors and not as the default.
At a minimum, include the following code:
private void APP_DispatcherUnhandledException(object sender,
DispatcherUnhandledExceptionEventArgs e)
{
MessageBox.Show(e.Exception.Message);
e.Handled = true;
}
Hope that helps,
Ray