|
Hi! This new example of "how an WindowsForms application" shoud be build, is, as in the case of TaskVision, lacking of the Architectural recomendations from the Microsoft Patterns site, it also ignores the recomendations from the tutorials in VisualStudio Help Files... but, now, I have found that it also ignores "simple good programming practices", like for example IGNORING EXCEPTIONS:
In the WebServicesLayer you can read (in methos like GetLookupTables and SendReceiveIssues):
catch (WebException) { exceptionType = WebServicesExceptionType.WebException; }
and
catch (Exception) { HandleWebServicesException(WebServicesExceptionType.Exception); }
Now... this COMPLETLY IGNORES the information from the exception.... IssueVission show one of this generic error messages:
public const string IV_WEBEXCEPTION_TEXT = "The server is not responding. Please try again."; public const string IV_WEBEXCEPTION_TITLE = "Network Error"; public const string IV_WEBEXCEPTIONOFFLINEOK_TEXT = "The server is not responding. Starting IssueVision in offline mode."; public const string IV_WEBEXCEPTIONOFFLINEOK_TITLE = "Network Error - Working Offline"; public const string IV_SOAPEXCEPTION_TEXT = "The system could not log you on."; public const string IV_SOAPEXCEPTION_TITLE = "Login Error"; public const string IV_EXCEPTION_TEXT = "An unknown error has occurred"; public const string IV_EXCEPTION_TITLE = "Unknown Error";
Want to know what REALLY happened, or where it REALLY happened? well, you can NOT! (all you get is something like "Unknown Error". (Very useful!)
I agree end users do not need to see an stacktrace... but IssueVision should at least use System.Debug.WriteLine to save the full error information to a file, or to the event log, and, if this is a "reference application" then it should use the Exception Management and the Logging Application Block. Don't you think?
|