-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathStateRefinementError.java
More file actions
33 lines (27 loc) · 1009 Bytes
/
StateRefinementError.java
File metadata and controls
33 lines (27 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package liquidjava.diagnostics.errors;
import liquidjava.diagnostics.TranslationTable;
import liquidjava.rj_language.ast.Expression;
import spoon.reflect.cu.SourcePosition;
/**
* Error indicating that a state refinement transition was violated
*
* @see LJError
*/
public class StateRefinementError extends LJError {
private final String expected;
private final String found;
public StateRefinementError(SourcePosition position, Expression expected, Expression found,
TranslationTable translationTable, String customMessage) {
super("State Refinement Error",
String.format("Expected state %s but found %s", expected.toDisplayString(), found.toDisplayString()),
position, translationTable, customMessage);
this.expected = expected.toDisplayString();
this.found = found.toDisplayString();
}
public String getExpected() {
return expected;
}
public String getFound() {
return found;
}
}