[crac] RFR: Use special class for exception aggregates [v4]

Radim Vansa duke at openjdk.org
Tue May 30 06:35:44 UTC 2023


On Mon, 29 May 2023 18:29:38 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> 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?

`Core` would throw a generic exception when something failed in the native part (`criuengine` returned exit code 1...). A custom implementation of `Context` would throw it when it can't call its children for some reason (but it's not a failure in the Resource itself).

-------------

PR Review Comment: https://git.openjdk.org/crac/pull/64#discussion_r1209764923


More information about the crac-dev mailing list