01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library 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 GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data;
17:
18: /**
19: * Thrown when there is an error in a datasource.
20: * <p>
21: * This class was used back in Java 1.3 before the initCause() method
22: * was available for IOException. Since this class is used to pass on
23: * problems from external services, providing the root cause is
24: * important.
25: * </p>
26: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/data/DataSourceException.java $
27: */
28: public class DataSourceException extends java.io.IOException {
29: private static final long serialVersionUID = -602847953059978370L;
30:
31: /**
32: * Constructs a new instance of DataSourceException
33: *
34: * @param msg A message explaining the exception
35: */
36: public DataSourceException(String msg) {
37: super (msg);
38: }
39:
40: /**
41: * Constructs a new instance of DataSourceException
42: *
43: * @param cause A message explaining the exception
44: */
45: public DataSourceException(Throwable cause) {
46: super (cause.getMessage());
47: initCause(cause);
48: }
49:
50: /**
51: * Constructs a new instance of DataSourceException
52: *
53: * @param msg A message explaining the exception
54: * @param cause the throwable object which caused this exception
55: */
56: public DataSourceException(String msg, Throwable cause) {
57: super(msg);
58: initCause(cause);
59: }
60: }
|