01: ///////////////////////////////
02: // Makumba, Makumba tag library
03: // Copyright (C) 2000-2003 http://www.makumba.org
04: //
05: // This library is free software; you can redistribute it and/or
06: // modify it under the terms of the GNU Lesser General Public
07: // License as published by the Free Software Foundation; either
08: // version 2.1 of the License, or (at your option) any later version.
09: //
10: // This library is distributed in the hope that it will be useful,
11: // but WITHOUT ANY WARRANTY; without even the implied warranty of
12: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: // Lesser General Public License for more details.
14: //
15: // You should have received a copy of the GNU Lesser General Public
16: // License along with this library; if not, write to the Free Software
17: // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: //
19: // -------------
20: // $Id: DataDefinitionParseError.java 1570 2007-09-16 21:13:06Z rosso_nero $
21: // $Name$
22: /////////////////////////////////////
23:
24: package org.makumba;
25:
26: /**
27: * Error occured during data definition parsing. It can contain a number of errors occured at different lines during
28: * parsing
29: *
30: * @author Cristian Bogdan
31: * @version $Id: DataDefinitionParseError.java 1570 2007-09-16 21:13:06Z rosso_nero $
32: */
33: public class DataDefinitionParseError extends DefinitionParseError {
34:
35: private static final long serialVersionUID = 1L;
36:
37: public DataDefinitionParseError() {
38: }
39:
40: /** Construct a message from the given explanation */
41: public DataDefinitionParseError(String explanation) {
42: super (explanation);
43: }
44:
45: /** Construct a message for an error that is due to an IOException */
46: public DataDefinitionParseError(String typeName,
47: java.io.IOException e) {
48: super (showTypeName(typeName) + e.toString());
49: this .typeName = typeName;
50: }
51:
52: /** Construct a message for a type */
53: public DataDefinitionParseError(String typeName, String reason) {
54: super (showTypeName(typeName) + reason);
55: this .typeName = typeName;
56: }
57:
58: /** Construct a message for a line */
59: public DataDefinitionParseError(String typeName, String reason,
60: String line) {
61: super (typeName, reason, line);
62: }
63:
64: /** Construct a message for a line and column */
65: public DataDefinitionParseError(String typeName, String reason,
66: String line, int column) {
67: super (showTypeName(typeName) + reason + "\n" + line + "\n"
68: + pointError(column));
69: this.typeName = typeName;
70: this.line = line;
71: this.column = column;
72: }
73: }
|