we have one console application in which we have another class library that contains all the business functions in which we are using in main method of program file into that we are getting errors but that is not able to handle.
I find below code to add in program file to handle exception and create handler MyExceptionHandler.
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyExceptionHandler);
In my project this only works when I have exception in Main method of program file, but when I have exception from Method of business function class it's not handling it.
Please suggest a better way to handle global exception.
.NET Global exception handler in console application
In this question they have different question then this as i already mention i already tried that solution. I am able to call it when it gives error in same program file method but when there is exceptions from another class library then its simply get back to main parent method.