Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.neomedia
Class MediaException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.java.sip.communicator.service.neomedia.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 Summary
static int GENERAL_ERROR
          The error code value which specifies that the MediaException carrying it does not give more information about its specifics.
 
Constructor Summary
MediaException(String message)
          Initializes a new MediaException instance with a specific detailed message and GENERAL_ERROR error code.
MediaException(String message, int errorCode)
          Initializes a new MediaException instance with a specific detailed message and a specific error code.
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.
MediaException(String message, Throwable cause)
          Initializes a new MediaException instance with a specific detailed message, GENERAL_ERROR error code and a specific Throwable cause.
 
Method Summary
 int getErrorCode()
          Gets the error code carried by this MediaException which gives more information about the specifics of this MediaException.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.