G
Guest
Hi All,
What is the best practice for handling error messages in NET CF2.0
application? During development, System.SR.dll is preinstalled in the device
that returns detailed error messages which is useful for developer.
However, in actual product realease, System.SR.dll may not be present in end
user device. How should I deal with it? Should I include System.SR.cab in the
product installer or
provide custom message. For custom error message, how do indentify different
errors that might occur within an Exception class?
For instance, WebException could return the following error messages:
Could not establish connection to network.
Unable to connect to the remote server.
try
{
HttpWebRequest httpRequest =
(HttpWebRequest)HttpWebRequest.Create("http://my.com");
httpRequest.GetResponse();
}
catch(System.Net.WebException error)
{
//Could not establish connection to network.
//return custom message A
//Unable to connect to the remote server.
//return custom message B
}
How can i differentiate this two to return appropriate custom error messages
to user?
Pls advise.
Thanks.
What is the best practice for handling error messages in NET CF2.0
application? During development, System.SR.dll is preinstalled in the device
that returns detailed error messages which is useful for developer.
However, in actual product realease, System.SR.dll may not be present in end
user device. How should I deal with it? Should I include System.SR.cab in the
product installer or
provide custom message. For custom error message, how do indentify different
errors that might occur within an Exception class?
For instance, WebException could return the following error messages:
Could not establish connection to network.
Unable to connect to the remote server.
try
{
HttpWebRequest httpRequest =
(HttpWebRequest)HttpWebRequest.Create("http://my.com");
httpRequest.GetResponse();
}
catch(System.Net.WebException error)
{
//Could not establish connection to network.
//return custom message A
//Unable to connect to the remote server.
//return custom message B
}
How can i differentiate this two to return appropriate custom error messages
to user?
Pls advise.
Thanks.