Package ej.audio
Class AudioException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- ej.audio.AudioException
-
- All Implemented Interfaces:
Serializable
public class AudioException extends RuntimeException
RuntimeExceptionthrown when an error occurred during an audio operation.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intOUT_OF_MEMORYError when trying to open a stream but there is not enough memory.static intUNAVAILABLE_DEVICEError when trying to open a stream but the audio device is not available.static intUNSPECIFIED_OPEN_ERRORError when trying to open a stream but it cannot be open for an implementation-specific reason.static intUNSUPPORTED_FORMATError when trying to open a stream but the format is not supported.
-
Constructor Summary
Constructors Constructor Description AudioException(int errorCode)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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetErrorCode()Returns the error code of this audio exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, toString
-
-
-
-
Field Detail
-
UNAVAILABLE_DEVICE
public static final int UNAVAILABLE_DEVICE
Error when trying to open a stream but the audio device is not available.- See Also:
- Constant Field Values
-
UNSUPPORTED_FORMAT
public static final int UNSUPPORTED_FORMAT
Error when trying to open a stream but the format is not supported.- See Also:
- Constant Field Values
-
OUT_OF_MEMORY
public static final int OUT_OF_MEMORY
Error when trying to open a stream but there is not enough memory.- See Also:
- Constant Field Values
-
UNSPECIFIED_OPEN_ERROR
public static final int UNSPECIFIED_OPEN_ERROR
Error when trying to open a stream but it cannot be open for an implementation-specific reason.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AudioException
public AudioException(int errorCode)
Creates an audio exception with the specified error code.- Parameters:
errorCode- the error code.
-
AudioException
public AudioException(int errorCode, Throwable cause)Creates an audio exception with the specified error code and cause.- Parameters:
errorCode- the error code.cause- the cause.
-
-