[crac] RFR: Use special class for exception aggregates [v4]
Anton Kozlov
akozlov at openjdk.org
Mon May 29 18:32:23 UTC 2023
On Fri, 19 May 2023 06:52:47 GMT, Radim Vansa <duke at openjdk.org> wrote:
>> Yes, that is a bug javax.crac does not follow jdk.crac.
>>
>> Agree about the constructor without args.
>>
>> And still want to delete the a constructor with message. We can introduce a jdk.crac.impl.CheckpointMessageException (along j.c.i.CheckpointOpenResourceException) which we use to communicate different reason(s) checkpoint is not successful.
>
> What about turning the inheritance the other way: final CheckpointAggregateException extends CheckpointException? This would be easily distinguishable, no need to change anything on Context interface. The no-arg constructor in CheckpointException would be protected.
> It's kind of natural that exceptions carry messages.
What will be the point of CheckpointException then? A more specific exception will also be preferable instead of that, isn't it?
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/64#discussion_r1209502345
More information about the crac-dev
mailing list