|
|
|
|||||
|
exception specification error in slice2cs
hello everyone
the slice: exception A { string reason; }; exception B extends A {}; class Test { void foo() throws B, A; } I need code is follow: ... catch(B ex) { ... } catch(A ex) { .. } but the code that was generate by slice2cs is: ... catch(A ex) { ... } catch(B ex) { .. } then build error CS0160. please check this bug, thanks. |
|
||||||
|
Patch available
Thanks for the bug report!
I've posted a patch in the Patches forum. Note that you can avoid the problem entirely by not mentioning a base exception and one ore more of its derived exceptions in an exception specification. For example, for your Slice definitions: Code:
exception A {
string reason;
};
exception B extends A {};
class Test
{
void foo() throws A; // No need to mention B here, because a B "is-a" A.
}
Cheers, Michi. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What's the difference between generatecs.exe and slice2cs.exe? | bartley | Help Center | 1 | 08-09-2006 07:37 PM |
| Where can I find specification about Ice? | kingbo | Help Center | 1 | 07-28-2005 04:18 AM |
| slice2cs - no output | kwaclaw | Help Center | 8 | 06-24-2005 06:52 PM |
| Patch #2 for slice2cs, release 1.5.1 | michi | Patches | 0 | 10-26-2004 11:11 PM |
| Possible bug in slice2cs version 1.5 | wodi | Bug Reports | 3 | 07-27-2004 10:06 PM |