# Class UnderdeterminedMatrixException

Object
Throwable
Exception
RuntimeException
IllegalArgumentException
UnderdeterminedMatrixException

All Implemented Interfaces:
  `Serializable`

public class UnderdeterminedMatrixException extends IllegalArgumentException
Thrown when a matrix cannot be determined because of unknown terms. It may happen, for example, during the construction of an affine transform between two coordinate systems when the source coordinate system does not have enough dimensions.

Since:
  1.6
See Also:
  - `Matrices​.createTransform(AxisDirection[], AxisDirection[])`
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UnderdeterminedMatrixException(String message)`
  Constructs a new exception with the specified detail message.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addUnknown(AxisDirection direction)`
  Indicates which term was unknown, specified as an axis direction for convenience.
  `Set<AxisDirection>`
  `getUnknownAxes()`
  Indicates which axes were unknown during the attempt to create an affine transform.

  ### 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

  - ### UnderdeterminedMatrixException

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

- ## Method Details

  - ### addUnknown

    public void addUnknown(AxisDirection direction)
    Indicates which term was unknown, specified as an axis direction for convenience. Unknown axes correspond to specific row indexes in the matrix, but are specified as axis directions for making easier for the caller to analyze. There is usually only one missing axis (typically the vertical or temporal one), but more can be added.

    In the current Apache SIS version, the only reason for undetermined matrix is a missing axis, but more reasons may be added in future versions.

    Parameters:
      `direction` - direction of the unknown axis.

  - ### getUnknownAxes

    public Set<AxisDirection> getUnknownAxes()
    Indicates which axes were unknown during the attempt to create an affine transform. Unknown axes are identified by the directions that they were expected to have.
    Returns:
      directions of axes that are missing in the source coordinate system.