Results 1 to 3 of 3

Thread: Exceptions in Ice v3.2

  1. #1
    borax00 is offline Registered User
    Name: Alex Brooks
    Organization: Marathon Robotics
    Project: www.marathon-robotics.com
    Join Date
    Oct 2005
    Posts
    56

    Exceptions in Ice v3.2

    Hi,

    I really like the fact that Ice v3.2 exceptions derive from std::exception -- in a bunch of places I have catch-all-and-generate-error-message blocks, and the extra catch block for Ice::Exception makes it ugly.

    Unfortunately I think I still need the extra block to generate meaningful error messages. Compare the following:

    (a)

    catch ( Ice::Exception &e ) {
    cout << e << endl;
    }

    (b)

    catch ( std::Exception &e ) {
    cout << e.what() << endl;
    }

    (a) produces:
    Network.cpp:662: Ice::ConnectionRefusedException:
    connection refused: Connection refused

    while (b) produces:
    N3Ice26ConnectionRefusedExceptionE


    What's going on here? Am I missing something?


    Thanks,

    Alex
    Alex Brooks
    Marathon Robotics
    www.marathon-robotics.com

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Unfortunately that's a bug. Ice exceptions should (but do not) override std::exception::what().

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    Thanks for the bug report! We've fixed this but, because the change is binary incompatible, it will become available only with the next major release.

    Cheers,

    Michi.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Missing error messages in ICE v3.4.1.
    By Gravitas in forum Bug Reports
    Replies: 0
    Last Post: 03-09-2011, 05:06 AM
  2. Compiling Ice v3.4.0 on OSX/Snow Leopard
    By jsgoecke in forum Help Center
    Replies: 2
    Last Post: 03-29-2010, 04:03 PM
  3. Tracing Exceptions in Distributed Ice Settings
    By jens__ in forum Help Center
    Replies: 4
    Last Post: 10-02-2009, 03:55 AM
  4. ICE for C#: Exceptions not serializable
    By kwaclaw in forum Comments
    Replies: 0
    Last Post: 02-07-2008, 11:31 AM
  5. Tru64 patches for Ice V3.0.0 #1
    By kvogel in forum Patches
    Replies: 7
    Last Post: 02-07-2006, 06:30 AM

Posting Permissions

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