Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


error log of third party app from C# app

havejeethavejeet Member Posts: 17
Hi all,

In my windows application written in C#, I am calling one windows utility...but it is likely to fail the execution of that windows utility execution...How do I log the error of that utility into my C# application?



  • PsightoplazmPsightoplazm Member Posts: 332 ✭✭
    Wrap the call you are making with a try/catch

    // Make your call here
    catch(Exception e)

    Another really good practice is to create a fault handler that you can put your default handling in which would allow you to wrap your calls like so:

    MyResult = MyFaultHandler.GetResult(
    //Put your call here

    This will allow you to set up your handling in one place and if you ever need to change it - you only ever have to change it in one place.
Sign In or Register to comment.