Skip to content

Should it be possible to have multiple fallbacks #507

Open
@NottyCode

Description

@NottyCode

With the update to Fallbacks to support triggering on particular exceptions it makes me wonder if it would be useful to support multiple Fallbacks on a method so different exceptions can trigger different fallback behaviour.

Something like:

@Fallbacks(@Fallback(fallbackMethod="fallbackOnIOE", applyOn=IOException.class),
           @Fallback(fallbackMethod="fallbackOnNPE", applyOn=NullPointerException.class))
public boolean doStuff() throws IOException, NullPointerException {
   // do stuff
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions