package com.qianwen.smartman.modules.cps.utils;
|
|
import com.qianwen.core.log.exception.ServiceException;
|
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/cps/utils/ThrowFun.class */
|
public final class ThrowFun {
|
|
@FunctionalInterface
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/cps/utils/ThrowFun$ThrowException.class */
|
public interface ThrowException {
|
void throwMessage(String message);
|
}
|
|
private ThrowFun() {
|
throw new UnsupportedOperationException("This is a utility class and cannot be instantiated");
|
}
|
|
public static ThrowException isTrue(boolean flag) {
|
return message -> {
|
if (flag) {
|
throw new ServiceException(message);
|
}
|
};
|
}
|
}
|