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

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -

R summary function in ddply (plyr) in a simple way -

c# - Are delegates created via lambda expressions guaranteed to be cached? -