Class MediaException

  • All Implemented Interfaces:
    Serializable

    public class MediaException
    extends Exception
    Implements an Exception thrown by the neomedia service interfaces and their implementations. MediaException carries an error code in addition to the standard Exception properties which gives more information about the specifics of the particular MediaException.
    Author:
    Lubomir Marinov
    See Also:
    Serialized Form
    • Field Detail

      • GENERAL_ERROR

        public static final int GENERAL_ERROR
        The error code value which specifies that the MediaException carrying it does not give more information about its specifics.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MediaException

        public MediaException​(String message)
        Initializes a new MediaException instance with a specific detailed message and GENERAL_ERROR error code.
        Parameters:
        message - the detailed message to initialize the new instance with
      • MediaException

        public MediaException​(String message,
                              int errorCode)
        Initializes a new MediaException instance with a specific detailed message and a specific error code.
        Parameters:
        message - the detailed message to initialize the new instance with
        errorCode - the error code which is to give more information about the specifics of the new instance
      • MediaException

        public MediaException​(String message,
                              Throwable cause)
        Initializes a new MediaException instance with a specific detailed message, GENERAL_ERROR error code and a specific Throwable cause.
        Parameters:
        message - the detailed message to initialize the new instance with
        cause - the Throwable which is to be carried by the new instance and which is to be reported as the cause for throwing the new instance. If cause is null, the cause for throwing the new instance is considered to be unknown.
      • MediaException

        public MediaException​(String message,
                              int errorCode,
                              Throwable cause)
        Initializes a new MediaException instance with a specific detailed message, a specific error code and a specific Throwable cause.
        Parameters:
        message - the detailed message to initialize the new instance with
        errorCode - the error code which is to give more information about the specifics of the new instance
        cause - the Throwable which is to be carried by the new instance and which is to be reported as the cause for throwing the new instance. If cause is null, the cause for throwing the new instance is considered to be unknown.
    • Method Detail

      • getErrorCode

        public int getErrorCode()
        Gets the error code carried by this MediaException which gives more information about the specifics of this MediaException.
        Returns:
        the error code carried by this MediaException which gives more information about the specifics of this MediaException