Latest post Tue, Feb 23 2016 9:19 PM by robg. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • Tue, Feb 23 2016 4:57 PM

    Example of showing response error in C#

    I'm wondering if someone could show me a C# example of showing a response error from a web service call.  I know it's a different type (ErrorType), but I"m not sure how to implement that.  In this case I'm doing a create masterclip and I want to show the error if there are any.

  • Tue, Feb 23 2016 9:19 PM In reply to

    • robg
    • Top 500 Contributor
    • Joined on Fri, Nov 4 2005
    • Tewksbury, MA
    • Posts 494
    • Points 5,605
    • Avid Developer Moderator
      Avid Employee

    Re: Example of showing response error in C#

    Ryan,

    You can use this code for most (if not all) of the responses from the calls in IPWS:

        if (response.Errors != null && response.Errors.Length > 0)
        {
          // there are errors
           for (int i=0; i<response.Errors.Length; i++)
               Console.WriteLine("error: " + response.Errors.Message + ", " + response.Errors.Details);
        }
        else
        {
            // no errors
            Console.WriteLine("Success!");
        }

     

Page 1 of 1 (2 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller