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

tv.amwa.maj.exception

## Class InstanceOverflowException

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

- All Implemented Interfaces:
    Serializable, MAJException, NewForMAJ

      public class InstanceOverflowException
      extends RuntimeException
      implements MAJException, NewForMAJ

  Thrown when the instance generator of a package id overflows. The exception can be queried to find out what kind of instance number generator is causing an overflow condition.

  No equivalent C result code.

  See Also:
    `PackageID.nextInstance()`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InstanceOverflowException()` Create a new instance number generator exception with no error message.
    `InstanceOverflowException(String msg, InstanceNumberGeneration generator)` Create a new instance number generator exception with the given error message and containing the kind of generator that has overflowed.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `InstanceNumberGeneration` | `getGenerator()` Returns the kind of instance number generator that overflowed and caused this exception.

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

    - #### InstanceOverflowException

          public InstanceOverflowException(String msg,
                                           InstanceNumberGeneration generator)

      Create a new instance number generator exception with the given error message and containing the kind of generator that has overflowed.

      Parameters:
        `msg` - Message describing the exception.
        `generator` - Kind of instance number generator that has overflowed.

    - #### InstanceOverflowException

          public InstanceOverflowException()

      Create a new instance number generator exception with no error message.

  - ### Method Detail

    - #### getGenerator

          public InstanceNumberGeneration getGenerator()

      Returns the kind of instance number generator that overflowed and caused this exception.

      Returns:
        The kind of instance number generator that has overflowed, or `InstanceNumberGeneration.NotDefined` if the kind of generator is not known.

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