# Class MismatchedDatumException

Object
Throwable
Exception
RuntimeException
IllegalArgumentException
MismatchedDatumException

All Implemented Interfaces:
  `Serializable`

public class MismatchedDatumException extends IllegalArgumentException
Thrown when the source and target CRS of a coordinate conversion use different datum. By definition, conversions do not perform any change of datum while transformations can do.

## Usage note

Apache SIS is tolerant about different datum at `DefaultConversion` construction time, for the reasons explained in its constructor. However, SIS is stricter at Derived CRS construction time.

Since:
  0.6
See Also:
  - `MismatchedDimensionException`
  - `MismatchedMatrixSizeException`
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MismatchedDatumException()`
  Constructs a new exception with no message.
  `MismatchedDatumException(String message)`
  Constructs a new exception with the specified detail message.
  `MismatchedDatumException(String message, Throwable cause)`
  Constructs a new exception with the specified detail message and cause.

- ## Method Summary

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### MismatchedDatumException

    public MismatchedDatumException()
    Constructs a new exception with no message.

  - ### MismatchedDatumException

    public MismatchedDatumException(String message)
    Constructs a new exception with the specified detail message.
    Parameters:
      `message` - the detail message, or `null` if none.

  - ### MismatchedDatumException

    public MismatchedDatumException(String message, Throwable cause)
    Constructs a new exception with the specified detail message and cause.
    Parameters:
      `message` - the detail message, or `null` if none.
      `cause` - the cause, or `null` if none.