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.factory;
17:
18: /**
19: * Deadly error. Usually if this is thrown, an application built upon geotools
20: * will not be able to function. I make this an error so that the standard bad code<br>
21: * <code> try { somthingRisky(); } catch (Exception e) {
22: * logger.warning("something happened"); }</code> will be subverted and the
23: * error will grind the application to a halt, as it should.
24: *
25: * @author Ian Schneider
26: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/factory/FactoryConfigurationError.java $
27: * @version $Id: FactoryConfigurationError.java 22443 2006-10-27 20:47:22Z desruisseaux $
28: *
29: * @see java.lang.Error
30: *
31: * @deprecated This error was used by {@link FactoryFinder}. The proposed replacement
32: * ({@link FactoryRegistry}) uses an exception ({@link FactoryRegistryException}) instead of
33: * an error. There is two reasons why we switched back to an exception instead of an error:
34: * <ul>
35: * <li>At the difference of {@link FactoryFinder}, {@link FactoryRegistry} do not expects
36: * a default implementation to be specified.</li>
37: * <li>{@link FactoryRegistry} can accepts an optional set of user-provided {@link Hints}.
38: * Those hints may reduces the set of acceptable factories.</li>
39: * </ul>
40: * Because of the above, a "factory not found" exception may not be caused by a JVM,
41: * compilation or packaging error. It is more similar to a
42: * {@link java.util.MissingResourceException}.
43: */
44: public class FactoryConfigurationError extends Error {
45: /**
46: * Creates a new instance of FactoryConfigurationError
47: *
48: * @param message Informative statememt about what whent wrong
49: */
50: public FactoryConfigurationError(String message) {
51: super (message);
52: }
53:
54: /**
55: * Creates a new instance of FactoryConfigurationError
56: *
57: * @param message Informative statememt about what whent wrong
58: * @param cause The origional exception which caused the problem
59: */
60: public FactoryConfigurationError(String message, Throwable cause) {
61: super(message, cause);
62: }
63: }
|