Re-throwing exception in Ice for C#

kwaclawkwaclaw Oshawa, CanadaMember Karl WaclawekOrganization: Personal
There are many cases in the Ice for C# source code where exceptions are re-thrown using this syntax:
catch (SomeException ex) {
  throw ex;
}
whereas the usual syntax would be:
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

Comments

  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    That's an artifact of porting from Java. Thanks for pointing this out! I'll go through and fix as appropriate.

    Cheers,

    Michi.
Sign In or Register to comment.