01: /* -*- mode: Java; c-basic-offset: 2; -*- */
02:
03: package org.openlaszlo.sc;
04:
05: import org.openlaszlo.sc.parser.SimpleNode;
06:
07: public class CompilerError extends RuntimeException {
08: public SimpleNode node;
09:
10: public CompilerError(String message) {
11: super (message);
12: this .node = null;
13: }
14:
15: public CompilerError(String message, SimpleNode node) {
16: super (message);
17: this .node = node;
18: }
19:
20: public void attachNode(SimpleNode node) {
21: assert this .node == null;
22: this .node = node;
23: }
24:
25: public String toString() {
26: return Compiler.getLocationString(node) + ": "
27: + super .toString();
28: }
29: }
30:
31: /**
32: * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights
33: * Reserved. Use is subject to license terms.
34: */
|