MediaErrorEvent (JavaFX 17)

Module javafx.media
Package javafx.scene.media

## Class MediaErrorEvent

- java.lang.Object
- - java.util.EventObject
  - - javafx.event.Event
    - - javafx.scene.media.MediaErrorEvent

- All Implemented Interfaces:
    `Serializable`, `Cloneable`

      public class MediaErrorEvent
      extends Event

  An `Event` representing the occurrence of an error in handling media.
  Since:
    JavaFX 2.0
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static EventType<MediaErrorEvent>` | `MEDIA_ERROR` | The only valid event type for the `MediaErrorEvent`.

    - ### Fields declared in class javafx.event.Event

      `ANY, consumed, eventType, NULL_SOURCE_TARGET, target`

    - ### Fields declared in class java.util.EventObject

      `source`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `MediaException` | `getMediaError()` | Retrieve the error associated with this event.
    `String` | `toString()` | Retrieve a `String` representation of the event.

    - ### Methods declared in class javafx.event.Event

      `clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed`

    - ### Methods declared in class java.util.EventObject

      `getSource`

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

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

- - ### Field Detail

    - #### MEDIA_ERROR

          public static final EventType<MediaErrorEvent> MEDIA_ERROR

      The only valid event type for the `MediaErrorEvent`.

  - ### Method Detail

    - #### getMediaError

          public MediaException getMediaError()

      Retrieve the error associated with this event.
      Returns:
        The `MediaException`

    - #### toString

          public String toString()

      Retrieve a `String` representation of the event.
      Overrides:
        `toString` in class `EventObject`