asp.net - Try Catch, AddHandler to log exceptions -


i want create sub handles try-catch exception thrown event.

i need add each exception message single log file, without having add logex(ex) (my sub adding string in log file) in every single try-catch block, that's need event handler came up.

i've searched lot, found ways create event handlers triggered unhandled exceptions.

thanks in advance.

as far know, .net not raise application level events handled exceptions, control-flow.

considering this, have edit of error handling 1 way or other, either adding method suggest, or bubbling errors using throw(); , considering errors @ global level using application_error event. recommend approach because more maintainable should want change logging method or add additional logic here.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -