1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  package org.springmodules.validation.valang;
18  
19  import org.springframework.core.NestedRuntimeException;
20  
21  public class ValangException extends NestedRuntimeException {
22  
23      private static final long serialVersionUID = -3223482349872384878L;
24  
25      private int line = 0;
26  
27      private int column = 0;
28  
29      public ValangException(String arg0, int line, int column) {
30          super(arg0);
31          this.line = line;
32          this.column = column;
33      }
34  
35      public ValangException(String arg0, Throwable arg1, int line, int column) {
36          super(arg0, arg1);
37          this.line = line;
38          this.column = column;
39      }
40  
41      public ValangException(Throwable t, int line, int column) {
42          super(t.getMessage(), t);
43          this.line = line;
44          this.column = column;
45      }
46  
47  
48      public String getMessage() {
49          return super.getMessage() + " at line " + line + ", column " + column;
50      }
51  
52      public int getLine() {
53          return this.line;
54      }
55  
56      public int getColumn() {
57          return this.column;
58      }
59  
60  }