01: /**
02: * Copyright 2008 Jens Dietrich Licensed under the Apache License, Version 2.0 (the "License");
03: * you may not use this file except in compliance with the License.
04: * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
05: * Unless required by applicable law or agreed to in writing, software distributed under the
06: * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
07: * either express or implied. See the License for the specific language governing permissions
08: * and limitations under the License.
09: */package nz.org.take.nscript;
10:
11: import nz.org.take.TakeException;
12:
13: /**
14: * Represents parser exceptions.
15: * @author <a href="http://www-ist.massey.ac.nz/JBDietrich/">Jens Dietrich</a>
16: */
17:
18: public class ScriptException extends TakeException {
19:
20: private int line = -1;
21:
22: public ScriptException() {
23: }
24:
25: public ScriptException(String arg0) {
26: super (arg0);
27: }
28:
29: public ScriptException(Throwable arg0) {
30: super (arg0);
31: }
32:
33: public ScriptException(String arg0, Throwable arg1) {
34: super (arg0, arg1);
35: }
36:
37: public ScriptException(int line) {
38: this ();
39: this .line = line;
40: }
41:
42: public ScriptException(String arg0, int line) {
43: super (arg0);
44: this .line = line;
45: }
46:
47: public ScriptException(Throwable arg0, int line) {
48: super (arg0);
49: this .line = line;
50: }
51:
52: public ScriptException(String arg0, Throwable arg1, int line) {
53: super (arg0, arg1);
54: this .line = line;
55: }
56:
57: public int getLine() {
58: return line;
59: }
60:
61: }
|