nerdexam
Microsoft

70-519 · Question #228

You are designing an ASP.NET MVC 2 application. You need to centralize the logic for handling and logging unhandled exceptions. Which approach should you recommend?

The correct answer is C. Decorate all controllers with a custom Handle Error attribute. See the full explanation below for the reasoning.

Question

You are designing an ASP.NET MVC 2 application. You need to centralize the logic for handling and logging unhandled exceptions. Which approach should you recommend?

Options

  • AUse try and catch on every method.
  • BOverride the One Exception method of each controller.
  • CDecorate all controllers with a custom Handle Error attribute
  • DDecorate all controllers with the default Handle Error attribute,

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    85% (22)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 70-519 Practice