01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2006, Institut de Recherche pour le Développement
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.referencing.factory;
18:
19: // OpenGIS dependencies
20: import org.opengis.referencing.FactoryException;
21:
22: /**
23: * Thrown when a requested factory has not been found. This exception may be thrown by
24: * {@link DeferredAuthorityFactory#createBackingStore}.
25: *
26: * @since 2.3
27: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/factory/FactoryNotFoundException.java $
28: * @version $Id: FactoryNotFoundException.java 20874 2006-08-07 10:00:01Z jgarnett $
29: * @author Martin Desruisseaux
30: */
31: public class FactoryNotFoundException extends FactoryException {
32: /**
33: * Serial number for interoperability with different versions.
34: */
35: private static final long serialVersionUID = -661925454228937249L;
36:
37: /**
38: * Construct an exception with no detail message.
39: */
40: public FactoryNotFoundException() {
41: }
42:
43: /**
44: * Construct an exception with the specified detail message.
45: *
46: * @param message The detail message. The detail message is saved
47: * for later retrieval by the {@link #getMessage()} method.
48: */
49: public FactoryNotFoundException(String message) {
50: super (message);
51: }
52:
53: /**
54: * Construct an exception with the specified cause. The detail message
55: * is copied from the cause {@linkplain Exception#getLocalizedMessage
56: * localized message}.
57: *
58: * @param cause The cause for this exception. The cause is saved
59: * for later retrieval by the {@link #getCause()} method.
60: */
61: public FactoryNotFoundException(Exception cause) {
62: super (cause.getLocalizedMessage(), cause);
63: }
64:
65: /**
66: * Construct an exception with the specified detail message and cause.
67: * The cause is the exception thrown in the underlying database
68: * (e.g. {@link java.io.IOException} or {@link java.sql.SQLException}).
69: *
70: * @param message The detail message. The detail message is saved
71: * for later retrieval by the {@link #getMessage()} method.
72: * @param cause The cause for this exception. The cause is saved
73: * for later retrieval by the {@link #getCause()} method.
74: */
75: public FactoryNotFoundException(String message, Throwable cause) {
76: super(message, cause);
77: }
78: }
|