Minimize
Table
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.codehaus.groovy.syntax;
17
18 import org.codehaus.groovy.GroovyException;
19
20
21
22
23
24
25
26 public class SyntaxException extends GroovyException {
27
28
29 private final int line;
30
31
32 private final int column;
33
34 private String sourceLocator;
35
36 public SyntaxException(String message, int line, int column) {
37 super(message, false);
38 this.line = line;
39 this.column = column;
40 }
41
42 public SyntaxException(String message, Throwable cause, int line, int column) {
43 super(message, cause);
44 this.line = line;
45 this.column = column;
46 }
47
48
49
50 public void setSourceLocator(String sourceLocator) {
51 this.sourceLocator = sourceLocator;
52 }
53
54 public String getSourceLocator() {
55 return this.sourceLocator;
56 }
57
58
59
60
61
62 public int getLine() {
63 return line;
64 }
65
66
67
68
69
70 public int getStartColumn() {
71 return column;
72 }
73
74
75
76
77 public int getStartLine() {
78 return getLine();
79 }
80
81
82
83
84 public int getEndColumn() {
85 return getStartColumn() + 1;
86 }
87
88 public String getOriginalMessage() {
89 return super.getMessage();
90 }
91
92 public String getMessage() {
93 return super.getMessage() + " @ line " + line + ", column " + column + ".";
94 }
95 }