5 ms·
I wish I could get the object data which caused the exception. None of these logging libraries provide that feature edit- for more info on what I mean: http://
by mandeepj 10y ago
I wish I could get the object data which caused the exception. None of these logging libraries provide that feature
edit-
for more info on what I mean:
http://stackoverflow.com/questions/157911/in-a-net-exception-how-to-get-a-stacktrace-with-argument-values http://stackoverflow.com/questions/157911/in-a-net-exception...
http://programmers.stackexchange.com/questions/278949/why-do-many-exception-messages-not-contain-useful-details http://programmers.stackexchange.com/questions/278949/why-do...
edit 2-
I just read little bit more on this. Creating a memory dump of your process is one way to go - https://msdn.microsoft.com/en-us/library/d5zhxt22.aspx#BKMK_Open_a_dump_file https://msdn.microsoft.com/en-us/library/d5zhxt22.aspx#BKMK_...
- bunderbunder 10y agoIf you're OK with using an IoC container, using Windsor or PostSharp like the first answer to your first link suggests does do the trick. I'm of two minds about whether it's a good idea to do this, though. I have done it once in the past, out of frustration at trying to support a particularly failure-prone application, and can confirm it was a useful thing to do at the time. I haven't done it since, though, and eventually ripped it back out once I got the app wrestled back to a happy place. The problem is, it lets you get away with not thinking very hard about your application's failure modes. So my sense was that, over the long run, the cure is worse than the disease.
- mandeepj 10y agoYou have a point. I think in a large app let's say 50+ screens and 100+ db tables, it will take quite a bit of time before we stablize it until then we are at the mercy of good logging and debugging tools.