source: osm/applications/editors/josm/plugins/opendata/includes/org/opengis/parameter/InvalidParameterTypeException.java@ 28000

Last change on this file since 28000 was 28000, checked in by donvip, 12 years ago

Import new "opendata" JOSM plugin

File size: 1.7 KB
Line 
1/*
2 * GeoTools - The Open Source Java GIS Toolkit
3 * http://geotools.org
4 *
5 * (C) 2011, Open Source Geospatial Foundation (OSGeo)
6 * (C) 2003-2005, Open Geospatial Consortium Inc.
7 *
8 * All Rights Reserved. http://www.opengis.org/legal/
9 */
10package org.opengis.parameter;
11
12
13/**
14 * Thrown when a parameter can't be cast to the requested type. For example this exception
15 * is thrown when {@link ParameterValue#doubleValue} is invoked but the value is not
16 * convertible to a {@code double}.
17 * <p>
18 * <b>Note:</b> This exception is of kind "{@linkplain IllegalStateException illegal state}"
19 * rather than "{@linkplain IllegalArgumentException illegal argument}" because it is not
20 * caused by a bad argument. It is rather a consequence of invoking the wrong zero-argument
21 * method.
22 *
23 * @author Martin Desruisseaux (IRD)
24 * @since GeoAPI 1.0
25 *
26 * @see ParameterValue#intValue
27 * @see ParameterValue#doubleValue
28 *
29 * @source $URL: http://svn.osgeo.org/geotools/branches/2.7.x/modules/library/opengis/src/main/java/org/opengis/parameter/InvalidParameterTypeException.java $
30 */
31public class InvalidParameterTypeException extends IllegalStateException {
32 /**
33 * Serial number for interoperability with different versions.
34 */
35 private static final long serialVersionUID = 2740762597003093176L;
36
37 /**
38 * Creates an exception with the specified message and parameter name.
39 *
40 * @param message The detail message. The detail message is saved for
41 * later retrieval by the {@link #getMessage()} method.
42 * @param parameterName The parameter name.
43 */
44 public InvalidParameterTypeException(String message, String parameterName) {
45 super(message);
46 }
47}
Note: See TracBrowser for help on using the repository browser.