log the result of an InteractionCheck
All checks were successful
github-mirror / push-github (push) Successful in 4s
Build / Gradle-Build (push) Successful in 32s
Test / Gradle-Test (push) Successful in 38s

This commit is contained in:
Tueem 2024-12-20 00:44:48 +01:00
parent 628abb4239
commit 3baf1eda9a
Signed by: tueem
GPG Key ID: F2CE0513D231AD7A

View File

@ -23,7 +23,9 @@ public record AppliedCheck(InteractionCheck<?> check, Annotation annotation) {
method.setAccessible(true);
try {
logger.debug("Executing pre check {} with context {}", check.getClass().getName(), context.toString());
return (boolean) method.invoke(check, context, annotation);
boolean result = (boolean) method.invoke(check, context, annotation);
logger.debug("Pre Check {} {} with context {}", check.getClass().getName(), result ? "succeeded" : "failed", context.toString());
return result;
} catch (IllegalAccessException | InvocationTargetException | SecurityException e) {
logger.fatal(e);
return false;