view src/kryshen/tema/TemplateException.java @ 1:548a93c24e55

Tema 0.1jk - Javakonkurs edition (imported from CVS).
author Mikhail Kryshen <mikhail@kryshen.net>
date Thu, 14 Dec 2006 23:22:05 +0300
parents 1d2fe61a3a62
children 6c41a0b43e58
line source
1 /*
2 * Copyright (C) 2006 Mikhail A. Kryshen
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: TemplateException.java,v 1.5 2006/12/14 14:39:22 mikhail Exp $
19 */
21 package kryshen.tema;
23 /**
24 * Signals that template parsing fails.
25 *
26 * @author Mikhail A. Kryshen
27 */
28 public class TemplateException extends Exception {
29 //private String source;
30 //private int line;
32 // public TemplateException(String message) {
33 // super(message);
34 // }
36 // public TemplateException(String message, Throwable cause) {
37 // super(message, cause);
38 // }
40 public TemplateException(String message, Throwable cause,
41 TemplateReader tr) {
42 this(message, cause, tr.getSource(), tr.getLineNumber() + 1);
43 }
45 public TemplateException(String message, TemplateReader tr) {
46 this(message, tr.getSource(), tr.getLineNumber() + 1);
47 }
49 public TemplateException(String message, Throwable cause,
50 String source, int line) {
51 super(source + ":" + line + ": " + message, cause);
52 //this.source = source;
53 //this.line = line;
54 }
56 public TemplateException(String message, String source, int line) {
57 super(source + ":" + line + ": " + message);
58 //this.source = source;
59 //this.line = line;
60 }
61 }