Results 1 to 3 of 3

Thread: Exception not being passed from remote client to local?

  1. #1
    Gravitas is offline Registered User
    Name: Shane Tolmie
    Organization: NeuralFutures LLC
    Project: Server modules in C++, C# and Java, to client.
    Join Date
    Feb 2011
    Posts
    40

    Exception not being passed from remote client to local?

    I'm having a problem with exceptions not being passed from the remote client to the local client.

    The slice definition is:

    exception ExceptionIceGeneral
    {
    string Description;
    };
    The C# server sits behind a Glacier2 firewall, and throws an exception thus:

    throw new ExceptionIceGeneral("New Exception");
    The C# client tries to intercept the exception:

    catch (ExceptionIceGeneral e)
    {
    Console.Write("Exception is: {0}.\n", e.Description);
    }
    However, the code above does not intercept this exception: instead, the following exception handler is invoked:

    catch (System.Exception ex)
    {
    Console.Error.WriteLine(ex);
    }
    However, this handler does not contain the "Description", so there is no way to tell what caused the error (the client prints "Ice.UnknownUserException", there is no correct "Description" string anywhere in "ex").

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Hi Shane,

    It would also help us to see the Slice definition of the operation that you're invoking.

    One simple explanation for this situation is neglecting to include ExceptionIceGeneral in the operation's throws clause. Another possibility is a mismatch between the Slice definitions in use by the client and server.

    Regards,
    Mark

  3. #3
    Gravitas is offline Registered User
    Name: Shane Tolmie
    Organization: NeuralFutures LLC
    Project: Server modules in C++, C# and Java, to client.
    Join Date
    Feb 2011
    Posts
    40
    The problem seems to be solved now.

    - The exceptions are making their way back to the client now. I think the problem was that I was catching the wrong exception which stripped out some of the exception information.
    - I added SmartInspect to the server, so the exceptions are being logged properly in any case.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 05-30-2008, 06:58 AM
  2. static client remote port
    By JAX82 in forum Help Center
    Replies: 1
    Last Post: 07-19-2007, 05:42 AM
  3. icegridnode: local and remote addresses
    By albertods in forum Help Center
    Replies: 1
    Last Post: 03-01-2007, 06:01 AM
  4. local exception / C++
    By daniell in forum Bug Reports
    Replies: 7
    Last Post: 11-08-2005, 12:56 PM
  5. how server to remote client.?
    By ouloba in forum Help Center
    Replies: 2
    Last Post: 10-17-2004, 10:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •