01: package org.drools.lang;
02:
03: import org.drools.compiler.DroolsError;
04:
05: /*
06: * Copyright 2005 JBoss Inc
07: *
08: * Licensed under the Apache License, Version 2.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: */
20:
21: public class ExpanderException extends DroolsError {
22:
23: /**
24: *
25: */
26: private static final long serialVersionUID = 400L;
27:
28: private String message;
29: private int[] line;
30:
31: public ExpanderException(final String message, final int line) {
32: this .message = message;
33: this .line = new int[] { line };
34: }
35:
36: public int[] getErrorLines() {
37: return this .line;
38: }
39:
40: public String getMessage() {
41: return "[" + this .line[0] + "] " + this .message;
42: }
43:
44: public int getLine() {
45: return this .line[0];
46: }
47:
48: }
|