Exception Handling in ASP.NET MVC 4, 5 -
i using asp.net mvc 4
i want trace or handle exception globally.
1.which handled user code?
2.which not handled user code?
both type
how possible ?
http://www.codeguru.com/csharp/.net/net_asp/mvc/handling-errors-in-asp.net-mvc-applications.htm
shows different ways of handling errors globally. setting global exception handling filter usual.
globalfilters.filters.add(new specialhandleerrorattributecreatedbyyou());
you derive new attribute handleerrorattribute , put logic in there, overriding onexception method.
public override void onexception(exceptioncontext filtercontext)
however not show exceptions handled other code. point, handled not continue bubble stack. have put code in each of catch blocks either want.
Comments
Post a Comment