dotConnect for Zoho Desk Documentation
Devart.Data.ZohoDesk Namespace / ZohoDeskException Class
Members Example

In This Topic
    ZohoDeskException Class
    In This Topic
    The exception that is generated when Zoho Desk returns an error.
    Syntax
    Remarks
    This class is created whenever dotConnect for Zoho Desk encounters an error generated by the server, or ZohoDeskConnection has been closed before attempting to execute an operation on the server.
    Example
    The following example generates a ZohoDeskException due to a non-existing table, and then displays the exception.
    public void ThrowZohoDeskException()
    {
      string mySelectQuery = "SELECT * FROM NONEXISTINGTABLE";
      ZohoDeskConnection ZohoDeskConnection =
        new ZohoDeskConnection(
            Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f);
      ZohoDeskCommand ZohoDeskCommand = new ZohoDeskCommand(mySelectQuery,ZohoDeskConnection);
      try
      {
        ZohoDeskCommand.Connection.Open();
      }
      catch (ZohoDeskException myException)
      {
        MessageBox.Show("Message: " + myException.Message + "\n");
      }
    }
    Public Sub ThrowZohoDeskException()
      Dim mySelectQuery As String = "SELECT * FROM NONEXISTINGTABLE"
      Dim ZohoDeskConnection As New ZohoDeskConnection( _
        Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f)
      Dim ZohoDeskCommand As New ZohoDeskCommand(mySelectQuery, ZohoDeskConnection)
      Try
        ZohoDeskCommand.Connection.Open()
      Catch myException As ZohoDeskException
        MessageBox.Show("Message: " + myException.Message + ControlChars.Cr)
      End Try
    End Sub
    Inheritance Hierarchy

    System.Object
       System.Exception
          System.SystemException
             System.Runtime.InteropServices.ExternalException
                System.Data.Common.DbException
                   Devart.Data.ZohoDesk.ZohoDeskException

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also