Package ej.audio
Class AudioException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ej.audio.AudioException
- All Implemented Interfaces:
Serializable
RuntimeException thrown when an error occurred during an audio operation.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intError when trying to open a stream but there is not enough memory.static final intError when trying to open a stream but the audio device is not available.static final intError when trying to open a stream but it cannot be open for an implementation-specific reason.static final intError when trying to open a stream but the format is not supported. -
Constructor Summary
ConstructorsConstructorDescriptionAudioException(int errorCode) Creates an audio exception with the specified error code.AudioException(int errorCode, String message) Creates an audio exception with the specified error code.AudioException(int errorCode, Throwable cause) Creates an audio exception with the specified error code and cause. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the error code of this audio exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
UNAVAILABLE_DEVICE
public static final int UNAVAILABLE_DEVICEError when trying to open a stream but the audio device is not available.- See Also:
-
UNSUPPORTED_FORMAT
public static final int UNSUPPORTED_FORMATError when trying to open a stream but the format is not supported.- See Also:
-
OUT_OF_MEMORY
public static final int OUT_OF_MEMORYError when trying to open a stream but there is not enough memory.- See Also:
-
UNSPECIFIED_OPEN_ERROR
public static final int UNSPECIFIED_OPEN_ERRORError when trying to open a stream but it cannot be open for an implementation-specific reason.- See Also:
-
-
Constructor Details
-
AudioException
public AudioException(int errorCode) Creates an audio exception with the specified error code.- Parameters:
errorCode- the error code.
-
AudioException
Creates an audio exception with the specified error code.- Parameters:
errorCode- the error codemessage- the message
-
AudioException
Creates an audio exception with the specified error code and cause.- Parameters:
errorCode- the error codecause- the cause
-
-
Method Details
-
getErrorCode
public int getErrorCode()Returns the error code of this audio exception.- Returns:
- the error code
-