• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CyclopsMC / IntegratedDynamics / 20210191346

14 Dec 2025 03:32PM UTC coverage: 19.514% (-33.5%) from 53.061%
20210191346

push

github

rubensworks
Remove deprecations

663 of 8728 branches covered (7.6%)

Branch coverage included in aggregate %.

6786 of 29445 relevant lines covered (23.05%)

1.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

29.41
/src/main/java/org/cyclops/integrateddynamics/api/evaluate/EvaluationException.java
1
package org.cyclops.integrateddynamics.api.evaluate;
2

3
import com.google.common.collect.Lists;
4
import net.minecraft.network.chat.MutableComponent;
5

6
import java.util.List;
7

8
/**
9
 * Exception to indicate a failed evaluation.
10
 * @author rubensworks
11
 */
12
public class EvaluationException extends Exception {
13

14
    private final MutableComponent errorMessage;
15
    private boolean retryEvaluation;
16
    private final List<Runnable> resolutionListeners;
17

18
    public EvaluationException(MutableComponent errorMessage) {
19
        super(errorMessage.toString());
4✔
20
        this.errorMessage = errorMessage;
3✔
21
        this.retryEvaluation = false;
3✔
22
        this.resolutionListeners = Lists.newArrayList();
3✔
23
    }
1✔
24

25
    public MutableComponent getErrorMessage() {
26
        return errorMessage;
×
27
    }
28

29
    /**
30
     * This should only be set at construction time of this exception.
31
     * @param retryEvaluation If the evaluation may be retried again in the next tick.
32
     */
33
    public void setRetryEvaluation(boolean retryEvaluation) {
34
        this.retryEvaluation = retryEvaluation;
×
35
    }
×
36

37
    /**
38
     * @return If the evaluation may be retried again in the next tick.
39
     */
40
    public boolean isRetryEvaluation() {
41
        return retryEvaluation;
×
42
    }
43

44
    public void addResolutionListeners(Runnable listener) {
45
        this.resolutionListeners.add(listener);
×
46
    }
×
47

48
    /**
49
     * If evaluators halt operation due to this thrown evaluation,
50
     * invoking this method will cause them to remove the exception and resume operation.
51
     *
52
     * In contrast to {@link #retryEvaluation}, this may be invoked anywhere within the lifetime of evaluation
53
     * exceptions.
54
     */
55
    public void resolve() {
56
        for (Runnable resolutionListener : Lists.newArrayList(this.resolutionListeners.listIterator())) {
×
57
            resolutionListener.run();
×
58
        }
×
59
    }
×
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc