class ScriptProgressCheck implements ProgressCheck {

    void guardSessionHandler(final String methodName, final EventHandlerBody body) throws RepositoryException {
        if (!handlerMissCache.contains(methodName)) {
            try {
                body.apply((args) -> this.script.invokeFunction(methodName, args));
            } catch (NoSuchMethodException ignored) {
                handlerMissCache.add(methodName);
            } catch (ScriptException e) {
                if (Result.failure(e).findCause(RepositoryException.class).isPresent()) {
                    throw new ScriptRepositoryException(e);
                }
                throw new RuntimeException(e);
            }
        }
    }

      ScriptProgressCheck(final @NotNull Invocable script,
                        final @NotNull ScriptHelper helper,
                        final @Nullable URL scriptUrl);

}