PrepAway - Latest Free Exam Questions & Answers

What should you do?

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?

PrepAway - Latest Free Exam Questions & Answers

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.

One Comment on “What should you do?

  1. yBee says:

    According to blog of Ivan Krivyakov about this topic (http://www.ikriv.com/blog/?p=1440) I’m confused between A and D. However I’ve found this statement about Win32 filter in other blog: “The problem with this approach is that you probably don’t have access to a useful CLR traceback.” (http://freshfoo.com/blog/dotnet_exceptions.1024px) which would prevent us from preparing good logging strategy. Hence the answer appears to be A.




    0



    0

Leave a Reply