01: package org.drools.compiler;
02:
03: import java.io.PrintStream;
04: import java.io.StringWriter;
05:
06: /**
07: * This is used for reporting errors with loading a ruleflow.
08: * @author Michael Neale
09: *
10: */
11: public class RuleFlowLoadError extends DroolsError {
12:
13: private String message;
14: private Exception exception;
15: private static final int[] lines = new int[0];
16:
17: public RuleFlowLoadError(String message, Exception nested) {
18:
19: this .message = message;
20: this .exception = nested;
21: }
22:
23: public int[] getErrorLines() {
24: return this .lines;
25: }
26:
27: public String getMessage() {
28: if (exception != null) {
29: return message + " : Exception " + exception.getClass()
30: + " : " + exception.getMessage();
31: } else {
32: return message;
33: }
34: }
35:
36: }
|