In my c开发者_开发知识库ode i am running an exe file through a process call. How to handle exception generated by the exe file. Can someone please help.
If the exe file is unmanaged, you can't catch exceptions that it throws.
What you can do, is check its error code once the process exits. To do that use the Process
class to launch the exe. It has a property that gives you the exit code.
If the exe was a managed assembly, you would have been able to run it in a separate AppDomain, and catch the exception it threw.
精彩评论