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

tv.amwa.maj.exception

## Class BadPropertyException

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

- All Implemented Interfaces:
    Serializable, MAJException

      public class BadPropertyException
      extends RuntimeException
      implements MAJException

  Thrown when an optional property should be omitted in the current context. In the AAF specification, the cases when this can occur are labelled as Conditional Rules. This is different from a `PropertyNotPresentException` which is thrown when an attempt is made to read an optional property that is currently omitted.

  For example, according to conditional rule 1 of the event class, its position property shall only be present when it is in an event track. Any attempt to set or get this property in another context should result in this exception being thrown.

  Equivalent C result code: `AAFRESULT_BAD_PROP 0x801200CB`

  See Also:
    `Event`, `EventTrack`, `Component`, `Sequence`, `AAFFileDescriptor`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BadPropertyException()` Create a new bad property exception with no message.
    `BadPropertyException(String msg)` Create a new bad property 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

    - #### BadPropertyException

          public BadPropertyException(String msg)

      Create a new bad property exception with the given descriptive message.

      Parameters:
        `msg` - Message describing the exception.

    - #### BadPropertyException

          public BadPropertyException()

      Create a new bad property exception with no message.

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