view src/kryshen/tema/TemplateException.java @ 15:e9d13c7ffeb1

Update header comment.
author Mikhail Kryshen <mikhail@kryshen.net>
date Tue, 24 Mar 2009 18:51:47 +0300
parents 6c41a0b43e58
children
line source
1 /*
2 * Copyright 2006-2009 Mikhail Kryshen
3 *
4 * This file is part of Tema.
5 *
6 * Tema is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * Tema is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the
17 * GNU Lesser General Public License along with Tema.
18 * If not, see <http://www.gnu.org/licenses/>.
19 */
21 package kryshen.tema;
23 import kryshen.tema.io.TemplateReader;
25 /**
26 * Signals that template parsing fails.
27 *
28 * @author Mikhail Kryshen
29 */
30 public class TemplateException extends Exception {
31 //private String source;
32 //private int line;
34 // public TemplateException(String message) {
35 // super(message);
36 // }
38 // public TemplateException(String message, Throwable cause) {
39 // super(message, cause);
40 // }
42 public TemplateException(String message, Throwable cause,
43 TemplateReader tr) {
44 this(message, cause, tr.getSource(), tr.getLineNumber() + 1);
45 }
47 public TemplateException(String message, TemplateReader tr) {
48 this(message, tr.getSource(), tr.getLineNumber() + 1);
49 }
51 public TemplateException(String message, Throwable cause,
52 String source, int line) {
53 super(source + ":" + line + ": " + message, cause);
54 //this.source = source;
55 //this.line = line;
56 }
58 public TemplateException(String message, String source, int line) {
59 super(source + ":" + line + ": " + message);
60 //this.source = source;
61 //this.line = line;
62 }
63 }