APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javafx.scene.media

public final Class MediaException

extends RuntimeException
Class Inheritance
Imports
com.sun.media.jfxmedia.MediaError

A MediaException describes a runtime error condition in a Media, MediaPlayer or MediaView.
Since
JavaFX 2.0
See Also
Media#onErrorProperty, MediaView#onErrorProperty

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
MediaException.Type

Enumeration describing categories of errors.

Field Summary

Modifier and TypeField and Description
private final MediaException.Type
type

What caused this error.

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static MediaException.Type

Returns:

API level error type.
errorCodeToType
(int
Error code from implementation layer.
errorCode
)

Map MediaError codes to Types.

pack-priv static MediaException
exceptionToMediaException(Exception e)

converts Java exceptions into mediaErrors

pack-priv static MediaException
getMediaException(Object source, int errorCode, String message)

public MediaException.Type

Returns:

The type of this error
getType
()

Retrieves the category into which this error falls.

pack-priv static MediaException
public String

Returns:

a string representation of this MediaException object.
toString
()

Overrides java.lang.Throwable.toString.

Returns a string representation of this MediaException object.

Field Detail

typeback to summary
private final MediaException.Type type

What caused this error.

Constructor Detail

MediaExceptionback to summary
pack-priv MediaException(MediaException.Type type, Throwable t)
MediaExceptionback to summary
pack-priv MediaException(MediaException.Type type, String message, Throwable t)
MediaExceptionback to summary
pack-priv MediaException(MediaException.Type type, String message)

Method Detail

errorCodeToTypeback to summary
pack-priv static MediaException.Type errorCodeToType(int errorCode)

Map MediaError codes to Types.

Parameters
errorCode:int

Error code from implementation layer.

Returns:MediaException.Type

API level error type.

exceptionToMediaExceptionback to summary
pack-priv static MediaException exceptionToMediaException(Exception e)

converts Java exceptions into mediaErrors

getMediaExceptionback to summary
pack-priv static MediaException getMediaException(Object source, int errorCode, String message)
getTypeback to summary
public MediaException.Type getType()

Retrieves the category into which this error falls.

Returns:MediaException.Type

The type of this error

haltExceptionback to summary
pack-priv static MediaException haltException(String message)
toStringback to summary
public String toString()

Overrides java.lang.Throwable.toString.

Returns a string representation of this MediaException object.

Returns:String

a string representation of this MediaException object.

Annotations
@Override
javafx.scene.media back to summary

public final Enum MediaException.Type

extends Enum<MediaException.Type>
Class Inheritance

Enumeration describing categories of errors. A number of different actual Exceptions may belong to the same category.
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
public static final MediaException.Type
MEDIA_CORRUPTED

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

public static final MediaException.Type
MEDIA_INACCESSIBLE

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

public static final MediaException.Type
MEDIA_UNAVAILABLE

Indicates an error has occurred: the media does not exist or is otherwise unavailable.

public static final MediaException.Type
MEDIA_UNSPECIFIED

Indicates that the media has not been specified.

public static final MediaException.Type
MEDIA_UNSUPPORTED

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

public static final MediaException.Type
OPERATION_UNSUPPORTED

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

public static final MediaException.Type
PLAYBACK_ERROR

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

public static final MediaException.Type
PLAYBACK_HALTED

Indicates an unrecoverable error which has resulted in halting playback.

public static final MediaException.Type
UNKNOWN

Indicates an error has occurred for an unknown reason.

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static MediaException.Type
public static MediaException.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

MEDIA_CORRUPTEDback to summary
public static final MediaException.Type MEDIA_CORRUPTED

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

MEDIA_INACCESSIBLEback to summary
public static final MediaException.Type MEDIA_INACCESSIBLE

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

MEDIA_UNAVAILABLEback to summary
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_UNSPECIFIEDback to summary
public static final MediaException.Type MEDIA_UNSPECIFIED

Indicates that the media has not been specified.

MEDIA_UNSUPPORTEDback to summary
public static final MediaException.Type MEDIA_UNSUPPORTED

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

OPERATION_UNSUPPORTEDback to summary
public static final MediaException.Type OPERATION_UNSUPPORTED

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

PLAYBACK_ERRORback to summary
public static final MediaException.Type PLAYBACK_ERROR

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

PLAYBACK_HALTEDback to summary
public static final MediaException.Type PLAYBACK_HALTED

Indicates an unrecoverable error which has resulted in halting playback.

UNKNOWNback to summary
public static final MediaException.Type UNKNOWN

Indicates an error has occurred for an unknown reason.

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static MediaException.Type valueOf(String name)
valuesback to summary
public static MediaException.Type[] values()