I want to modify or just load a .NET executable and then handle its unhandled exceptions. My goal is to make a smart handler which can send the stack traces.
Asked
Active
Viewed 938 times
2 Answers
4
Could you load an assembly into a seperate app domain and then subscribe to the unhandled exceptions of that app domain?
i.e. something like this
Can Unhandled Exceptions in Child AppDomains be prevented from crashing the main process?

Community
- 1
- 1

Dave Lawrence
- 3,843
- 2
- 21
- 35
4
Assuming that the other executable is a .NET application, load it into a new AppDomain
and run it there. When the target executable throws an exception, you get AppDomain.FirstChanceException Event
.

Sergey Kalinichenko
- 714,442
- 84
- 1,110
- 1,523