You are designing a complex and critical Windows desktop application by using Microsoft
.NET Framework 4 and Microsoft Visual Studio 2010. You plan to implement a logging
strategy for the application. You need to record all unexpected errors that occur in the
application. What should you do?
A.
• Subscribe to the unhandled exception event handler for the AppDomain object. •
Record relevant application-specific information to an external log.
B.
• Subscribe to the unhandled exception event handler for the application’s dispatcher on
the main application thread. • Record relevant application-specific information to an external
log.
C.
• Create a generic catch (Exception e) block in the Main method of the application. •
Record relevant application-specific information to a log in the Main method.
D.
• Create a global WIN 32 unhandled exception filter. • Record relevant
application-specific information to an external log from within the filter.