Hey KWien,
You mentioned error-logging be the global error handler. All I had
observed so far was the visible dialogue that comes up and "annoys" the
customer, who then proceeds to close it before calling to say something
was wrong.
Where would I find the error-log information? Event Viewer? A local
file? Within the Windows directory somewhere?
I believe Kevin is referring to whatever custom error logging an
application might provide. His point is that you would only handle an
exception at a point in the code where you can do something useful about
it. If that "something" includes logging the exception, it would be
wherever the application designer decided to put it. The event log would
be a natural location, but it could be a local file or even transmitted to
a server somewhere.
For some exceptions, this handling may well be near the top level of your
code and it may be that the only useful thing to do is present the error
to the user (for example, by displaying an informational message, along
with the Exception.Message property value, in a MessageBox.Show()
statement), and/or logging the error somewhere as the developer sees fit,
and then just continuing to allow the user to use the application normally.
For other exceptions, it might be there's a sensible way to handle the
error at a deeper level in the code. For example, some sort of data entry
or i/o where the input data is invalid but some default can be provided
instead in the event of an exception. Again, the user may or may not be
alerted, the exception may or may not be logged, but any of that would be
up to the person writing the code.
As far as I know, there is no automated exception logging facility that
handles this sort of thing. It would be something implemented by the
developer of the program.
Pete