Package org.geotools.referencing.wkt
Class UnformattableObjectException
Object
Throwable
Exception
RuntimeException
UnsupportedOperationException
UnformattableObjectException
- All Implemented Interfaces:
Serializable
Thrown by
Formattable.toWKT()
when an object can't be formatted as WKT. A formatting may fails because an
object is too complex for the WKT format capability (for example an
engineering CRS with different unit for each axis),
or because only some specific implementations can be formatted as WKT.- Since:
- 2.0
- Author:
- Martin Desruisseaux (IRD)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUnformattableObjectException
(String message, Class unformattable) Constructs an exception with the specified detail message. -
Method Summary
Modifier and TypeMethodDescriptionReturns the detail message.Returns the type of the object that can't be formatted.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnformattableObjectException
Constructs an exception with the specified detail message.- Parameters:
message
- The detail message. Ifnull
, a default message will be created.unformattable
- The type of the object that can't be formatted.- Since:
- 2.4
-
-
Method Details
-
getUnformattableClass
Returns the type of the object that can't be formatted. This is often an OpenGIS interface rather than the implementation class. For example if a engineering CRS uses different unit for each axis, then this method may returnCoordinateReferenceSystem.class
. It doesn't mean that no CRS can be formatted; only that a particular instance of it can't. Other possible classes areImageDatum
,ProjectedCRS
, etc.- Since:
- 2.4
-
getMessage
Returns the detail message. A default message is formatted if none was specified at construction time.- Overrides:
getMessage
in classThrowable
-