You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You could achieve it via creating a decorator class for the exception factory. Like this:
private static <X extends Exception> ExceptionFactory<X> failWith(final ExceptionFactory<X> xFactory, final String message) {
// (Obviously we could use a lambda expression instead, when in Java8)
return new ExceptionFactory<X>() {
@Override
public X newInstance(String ignored) {
return xFactory.newInstance(message);
}
};
}
Currently there's no way to pass in
String message
when using a boolean condition.The text was updated successfully, but these errors were encountered: