package org.gvsig.remoteClient.gml.exceptions; import java.util.Hashtable; import java.util.Map; /* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana * * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. * * For more information, contact: * * Generalitat Valenciana * Conselleria d'Infraestructures i Transport * Av. Blasco Ibáñez, 50 * 46010 VALENCIA * SPAIN * * +34 963862235 * gvsig@gva.es * www.gvsig.gva.es * * or * * IVER T.I. S.A * Salamanca 50 * 46005 Valencia * Spain * * +34 963163400 * dac@iver.es */ /* CVS MESSAGES: * * $Id: GMLException.java 18271 2008-01-24 09:06:43Z jpiera $ * $Log$ * Revision 1.1 2007-01-15 13:11:00 csanchez * Sistema de Warnings y Excepciones adaptado a BasicException * * Revision 1.2 2006/12/22 11:25:44 csanchez * Nuevo parser GML 2.x para gml's sin esquema * * Revision 1.1 2006/08/10 12:00:49 jorpiell * Primer commit del driver de Gml * * */ /** * GML Exception. * @author Jorge Piera Llodrá (piera_jor@gva.es) * @author Carlos Sánchez Periñán (sanchez_carper@gva.es) * */ public class GMLException extends Exception { private static final long serialVersionUID = -5486463227342843579L; private String filename=""; protected String formatString; protected String messageKey; protected long code; public GMLException() { } public GMLException(String file) { init(); this.filename=file; } public GMLException(Throwable exception) { init(); initCause(exception); } public GMLException(String file, Throwable exception) { init(); this.filename=file; initCause(exception); } public String getFilename() { return filename; } public void setFilename(String filename) { this.filename = filename; } protected Map values() { //Key -> value... filename -> name of the file Hashtable params; params = new Hashtable(); params.put("file",filename); return params; } public void init() { messageKey="Gml_Error"; formatString="Error opening GML shape %(file)"; code = serialVersionUID; } }