View Single Post
  #1 (permalink)  
Old 10-20-2005
kwaclaw kwaclaw is offline
Registered User
 
Name: Karl Waclawek
Organization: Toronto Star Newspapers Ltd.
Project: Proof of concept
 
Join Date: Sep 2004
Location: Oshawa, Canada
Posts: 143
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
The Toronto Star - http://www.thestar.com
Reply With Quote