Results 1 to 2 of 2

Thread: Re-throwing exception in Ice for C#

  1. #1
    kwaclaw is offline Registered User
    Name: Karl Waclawek
    Organization: Personal
    Project: Whiteboard application
    Join Date
    Sep 2004
    Location
    Oshawa, Canada
    Posts
    159

    Re-throwing exception in Ice for C#

    There are many cases in the Ice for C# source code where exceptions are re-thrown using this syntax:
    Code:
    catch (SomeException ex) {
      throw ex;
    }
    whereas the usual syntax would be:
    Code:
    catch (SomeException ex) {
      throw;
    }
    The difference is that in the first version, the existing stack trace is thrown away and the point of re-throwing is considered the new origin of the exception.

    Is this intentional (why?), or just an artifact of porting from Java, where this difference does not exist (AFAIK)?

    Karl
    Karl Waclawek

  2. #2
    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
    That's an artifact of porting from Java. Thanks for pointing this out! I'll go through and fix as appropriate.

    Cheers,

    Michi.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 07-14-2008, 11:37 AM
  2. Exception throwing question
    By g00fy in forum Help Center
    Replies: 2
    Last Post: 06-28-2006, 07:40 PM
  3. Replies: 4
    Last Post: 01-06-2006, 12:33 PM
  4. Throwing exception from another module
    By beardo in forum Help Center
    Replies: 3
    Last Post: 06-01-2005, 12:21 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
  •