Which approach should you recommend?

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?

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?

A.
Use try and catch on every method.

B.
Override the OnException method of each controller.

C.
Decorate all controllers with a custom HandleError attribute.

D.
Decorate all controllers with the default HandleError attribute.



Leave a Reply 0

Your email address will not be published. Required fields are marked *