java exception mapping generates invalid code

vukicevicvukicevic Member Vladimir VukicevicOrganization: DUGProject: DUG Insight ✭✭
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

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Definitely looks like a bug. Thanks for reporting this.

    Regards,
    Mark
Sign In or Register to comment.