MediaException.Type (JavaFX 17)

Module javafx.media
Package javafx.scene.media

## Enum MediaException.Type

- java.lang.Object
- - java.lang.Enum<MediaException.Type>
  - - javafx.scene.media.MediaException.Type

- All Implemented Interfaces:
    `Serializable`, `Comparable<MediaException.Type>`
  Enclosing class:
    MediaException

      public static enum MediaException.Type
      extends Enum<MediaException.Type>

  Enumeration describing categories of errors. A number of different actual `Exception`s may belong to the same category.
  Since:
    JavaFX 2.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---
    `MEDIA_CORRUPTED` | Indicates an error has occurred: the media appears to be invalid or corrupted.
    `MEDIA_INACCESSIBLE` | Indicates an error has occurred: although the media may exist, it is not accessible.
    `MEDIA_UNAVAILABLE` | Indicates an error has occurred: the media does not exist or is otherwise unavailable.
    `MEDIA_UNSPECIFIED` | Indicates that the media has not been specified.
    `MEDIA_UNSUPPORTED` | Indicates that this media type is not supported by this platform.
    `OPERATION_UNSUPPORTED` | Indicates that an operation performed on the media is not supported by this platform.
    `PLAYBACK_ERROR` | Indicates a playback error which does not fall into any of the other pre-defined categories.
    `PLAYBACK_HALTED` | Indicates an unrecoverable error which has resulted in halting playback.
    `UNKNOWN` | Indicates an error has occurred for an unknown reason.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static MediaException.Type` | `valueOf​(String name)` | Returns the enum constant of this type with the specified name.
    `static MediaException.Type[]` | `values()` | Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods declared in class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods declared in class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### MEDIA_CORRUPTED

          public static final MediaException.Type MEDIA_CORRUPTED

      Indicates an error has occurred: the media appears to be invalid or corrupted.

    - #### MEDIA_INACCESSIBLE

          public static final MediaException.Type MEDIA_INACCESSIBLE

      Indicates an error has occurred: although the media may exist, it is not accessible.

    - #### MEDIA_UNAVAILABLE

          public static final MediaException.Type MEDIA_UNAVAILABLE

      Indicates an error has occurred: the media does not exist or is otherwise unavailable. This error may be the result of security settings preventing access when running in a browser.

    - #### MEDIA_UNSPECIFIED

          public static final MediaException.Type MEDIA_UNSPECIFIED

      Indicates that the media has not been specified.

    - #### MEDIA_UNSUPPORTED

          public static final MediaException.Type MEDIA_UNSUPPORTED

      Indicates that this media type is not supported by this platform.

    - #### OPERATION_UNSUPPORTED

          public static final MediaException.Type OPERATION_UNSUPPORTED

      Indicates that an operation performed on the media is not supported by this platform.

    - #### PLAYBACK_ERROR

          public static final MediaException.Type PLAYBACK_ERROR

      Indicates a playback error which does not fall into any of the other pre-defined categories.

    - #### PLAYBACK_HALTED

          public static final MediaException.Type PLAYBACK_HALTED

      Indicates an unrecoverable error which has resulted in halting playback.

    - #### UNKNOWN

          public static final MediaException.Type UNKNOWN

      Indicates an error has occurred for an unknown reason.

  - ### Method Detail

    - #### values

          public static MediaException.Type[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (MediaException.Type c : MediaException.Type.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static MediaException.Type valueOf​(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null