001// Copyright 2004, 2005 The Apache Software Foundation
002//
003// Licensed under the Apache License, Version 2.0 (the "License");
004// you may not use this file except in compliance with the License.
005// You may obtain a copy of the License at
006//
007//     http://www.apache.org/licenses/LICENSE-2.0
008//
009// Unless required by applicable law or agreed to in writing, software
010// distributed under the License is distributed on an "AS IS" BASIS,
011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012// See the License for the specific language governing permissions and
013// limitations under the License.
014
015package org.apache.tapestry.parse;
016
017import org.apache.hivemind.Locatable;
018import org.apache.hivemind.Location;
019
020/**
021 *  Exception thrown indicating a problem parsing an HTML template.
022 *
023 *  @author Howard Ship
024 * 
025 **/
026
027public class TemplateParseException extends Exception implements Locatable
028{
029    private static final long serialVersionUID = 3741503276431589982L;
030    
031        private Location _location;
032    private Throwable _rootCause;
033
034    public TemplateParseException(String message)
035    {
036        this(message, null, null);
037    }
038
039    public TemplateParseException(String message, Location location)
040    {
041        this(message, location, null);
042    }
043
044    public TemplateParseException(String message, Location location, Throwable rootCause)
045    {
046        super(message);
047
048        _location = location;
049
050        _rootCause = rootCause;
051
052    }
053
054    public Location getLocation()
055    {
056        return _location;
057    }
058
059    public Throwable getRootCause()
060    {
061        return _rootCause;
062    }
063
064}