diff --git a/src/main/java/dev/struchkov/haiti/filter/jooq/exception/FilterJooqHaitiException.java b/src/main/java/dev/struchkov/haiti/filter/jooq/exception/FilterJooqHaitiException.java index ebf9c3e..049e617 100644 --- a/src/main/java/dev/struchkov/haiti/filter/jooq/exception/FilterJooqHaitiException.java +++ b/src/main/java/dev/struchkov/haiti/filter/jooq/exception/FilterJooqHaitiException.java @@ -2,10 +2,19 @@ package dev.struchkov.haiti.filter.jooq.exception; import dev.struchkov.haiti.filter.exception.FilterException; +import java.text.MessageFormat; +import java.util.function.Supplier; + public class FilterJooqHaitiException extends FilterException { public FilterJooqHaitiException(String message) { super(message); } + public static Supplier filterJooqException(String message, Object... objects) { + return () -> { + return new FilterJooqHaitiException(MessageFormat.format(message, objects)); + }; + } + }