Archived

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

java exception mapping generates invalid code

With Ice 3.4.2, the following slice fragment:

exception BaseException { };
exception SpecificException extends BaseException {
int id;
};

generates invalid java; no constructors are created for BaseException, but SpecificException has constructors that looks like:

SpecificException(int id, Throwable cause) {
super(cause);
...
}

SpecificException(Throwable cause) {
super(cause);
}

The superclass (BaseException) has no constructor that takes Throwable, so this doesn't compile -- BaseException's superclass /does/ have such a constructor, but super() only looks for the immediate superclass. The bug here seems to be that no-member exceptions still need to have a constructor that takes Throwable generated.

Comments

  • mes
    mes California
    Definitely looks like a bug. Thanks for reporting this.

    Regards,
    Mark