InvalidParameterException (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.exception

## Class InvalidParameterException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - tv.amwa.maj.exception.InvalidParameterException

- All Implemented Interfaces:
    Serializable, MAJException

      public class InvalidParameterException
      extends RuntimeException
      implements MAJException

  Thrown whenever a method call parameter contains a value that is invalid in the current context. For example, when looking up a definition in the dictionary using an identifier, if no definition of the appropriate type is available then this exception is thrown.

  Note that this exception if different from `IllegalArgumentException` as this exception is thrown when a parameter is invalid in the current context, whereas `IllegalArgumentException` is thrown when a parameter is illegal in any context. For example, looking up a definition that is not in a dictionary is invalid if the definition is not currently in that dictionary. Trying to set a non-negative parameter to a negative value is illegal.

  Equivalent C result code: `AAFRESULT_INVALID_PARAM 0x8012016C`

  See Also:
    `Dictionary`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvalidParameterException()` Create a new invalid parameter exception with no message.
    `InvalidParameterException(String msg)` Create a new invalid parameter exception with the given descriptive message.

  - ### Method Summary

    - ### Methods inherited from class java.lang.Throwable

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

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### InvalidParameterException

          public InvalidParameterException(String msg)

      Create a new invalid parameter exception with the given descriptive message.

      Parameters:
        `msg` - Message describing the exception.

    - #### InvalidParameterException

          public InvalidParameterException()

      Create a new invalid parameter exception with no message.

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.