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

wurstscript / WurstScript / 203

18 Oct 2023 02:20PM UTC coverage: 63.758% (+0.3%) from 63.447%
203

push

circleci

web-flow
Update deps, improve performance, JHCR fixes (#1080)

- update dependencies
- update stdlib verison for unit tests
- only apply nullsetting when `-opt` is enabled to save some build time for testing
- minor performance improvements
- make build deterministic
- apply build map config before compilation
- hot code reload now more reliable

17246 of 27049 relevant lines covered (63.76%)

0.64 hits per line

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

33.33
de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/jassinterpreter/InterpreterException.java
1
package de.peeeq.wurstio.jassinterpreter;
2

3
import de.peeeq.wurstscript.ast.Element;
4
import de.peeeq.wurstscript.intermediatelang.interpreter.ProgramState;
5
import de.peeeq.wurstscript.parser.WPos;
6

7
public class InterpreterException extends RuntimeException {
8
    private static final long serialVersionUID = 3387292080655779808L;
9

10
    private Element trace;
11

12
    private String stackTrace;
13

14
    public InterpreterException(ProgramState g, String msg) {
15
        super(msg);
×
16
        this.trace = g.getLastStatement().attrTrace();
×
17
    }
×
18

19
    public InterpreterException(String msg) {
20
        super(msg);
1✔
21
        this.trace = null;
1✔
22
    }
1✔
23

24
    public InterpreterException(Element trace, String msg) {
25
        super(msg);
×
26
        this.trace = trace;
×
27
    }
×
28

29
    public InterpreterException(Element trace, String msg, Throwable e) {
30
        super(msg, e);
×
31
        this.trace = trace;
×
32
    }
×
33

34
    @Override
35
    public String getMessage() {
36
        String res = super.getMessage();
×
37
        if (trace != null) {
×
38
            WPos pos = trace.attrSource();
×
39
            res = res + "\n  at " + pos.getFile() + " line " + pos.getLine();
×
40
        }
41
        return res;
×
42
    }
43

44
    @Override
45
    public String toString() {
46
        return getMessage()
×
47
                + (stackTrace != null ? "\nStack trace:\n" + stackTrace : "");
×
48
    }
49

50

51
    public InterpreterException setStacktrace(String msg) {
52
        if (this.stackTrace == null) {
1✔
53
            this.stackTrace = msg;
1✔
54
        }
55
        return this;
1✔
56
    }
57

58
    public InterpreterException setTrace(Element trace) {
59
        if (this.trace == null) {
1✔
60
            this.trace = trace;
1✔
61
        }
62
        return null;
1✔
63
    }
64

65
    public Element getTrace() {
66
        return trace;
×
67
    }
68

69
    public String getWurstStackTrace() {
70
        return stackTrace;
×
71
    }
72
}
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