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

CyclopsMC / IntegratedDynamics / 19675908292

25 Nov 2025 04:02PM UTC coverage: 53.043% (+0.005%) from 53.038%
19675908292

push

github

rubensworks
Merge remote-tracking branch 'origin/master-1.21-lts' into master-1.21

2883 of 8780 branches covered (32.84%)

Branch coverage included in aggregate %.

17356 of 29376 relevant lines covered (59.08%)

3.07 hits per line

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

52.94
/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;
3✔
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;
3✔
35
    }
1✔
36

37
    /**
38
     * @return If the evaluation may be retried again in the next tick.
39
     */
40
    public boolean isRetryEvaluation() {
41
        return retryEvaluation;
3✔
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