RFR: Make the notifier retry logic more granular

Erik Helin ehelin at openjdk.java.net
Mon Mar 16 10:13:45 UTC 2020


On Mon, 16 Mar 2020 09:37:44 GMT, Robin Westberg <rwestberg at openjdk.org> wrote:

> Hi all,
> 
> Please review this change that makes the notifier retry logic more granular. Instead of marking an entire notifier as
> either retriable or not, allow a notifier to throw a NonRetriableException if a non-retriable operation fails.
> Best regards,
> Robin

Looks good, just a small suggestion on using `Throwable` instead of `RuntimeException`.

bots/notify/src/main/java/org/openjdk/skara/bots/notify/NonRetriableException.java line 35:

> 34:     }
> 35: }

Suggestion:

public class NonRetriableException extends Exception {
    private final Throwable cause;

    public NonRetriableException(Throwable cause) {
        this.cause = cause;
    }

    public Throwable cause() {
        return cause;
    }
}

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

Marked as reviewed by ehelin (Reviewer).

PR: https://git.openjdk.java.net/skara/pull/510


More information about the skara-dev mailing list