Archived

This forum has been archived. Please start a new discussion on GitHub.

Patch for slice2cpp and slice2java

For Ice version 1.3.0 and earlier, the slice2cpp and slice2java compilers sometimes generate incorrect code for operations with multiple exceptions in an exception specification, if one exception in the specification is a base of one or more other exceptions in the same exception specification. For example:
exception Base {};
exception Derived extends Base {};

interface Foo {
    void op() throws Base, Derived;
};
The problem appears only if the exceptions in an exception specification are related by inheritance.

Attached is a patch for both C++ and Java. (Releases later than version 1.3.0 don't need this patch.)

Cheers,

Michi.