SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.java.sip.communicator.service.media.MediaException
All Implemented Interfaces:
Serializable

public class MediaException
extends Exception

Thrown when errors occur in the media package.

Author:
Emil Ivov
See Also:
Serialized Form

Field Summary
static int GENERAL_ERROR
          Set when no other error code can describe the exception that occurred.
static int INTERNAL_ERROR
          Set when an operation fails for implementation specific reasons.
static int IO_ERROR
          Set when an operation fails because of an input/output error.
static int NETWORK_ERROR
          Set when command fails due to a failure in network communications or a transport error.
static int SERVICE_NOT_STARTED
          Set to indicate that the service implementation needs to be started (initialized) before calling the method that threw the exception.
static int UNSUPPORTED_FORMAT_SET_ERROR
          Set when the media service is requested to receive or transmit in a format set that is not supported by the implementation.
 
Constructor Summary
MediaException(String message, int errorCode)
          Creates an exception with the specified error message and error code.
MediaException(String message, int errorCode, Throwable cause)
          Creates an exception with the specified message, errorCode and cause.
 
Method Summary
 int getErrorCode()
          Obtain the error code value.
 
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
Set when no other error code can describe the exception that occurred.

See Also:
Constant Field Values

NETWORK_ERROR

public static final int NETWORK_ERROR
Set when command fails due to a failure in network communications or a transport error.

See Also:
Constant Field Values

SERVICE_NOT_STARTED

public static final int SERVICE_NOT_STARTED
Set to indicate that the service implementation needs to be started (initialized) before calling the method that threw the exception.

See Also:
Constant Field Values

INTERNAL_ERROR

public static final int INTERNAL_ERROR
Set when an operation fails for implementation specific reasons.

See Also:
Constant Field Values

IO_ERROR

public static final int IO_ERROR
Set when an operation fails because of an input/output error.

See Also:
Constant Field Values

UNSUPPORTED_FORMAT_SET_ERROR

public static final int UNSUPPORTED_FORMAT_SET_ERROR
Set when the media service is requested to receive or transmit in a format set that is not supported by the implementation.

See Also:
Constant Field Values
Constructor Detail

MediaException

public MediaException(String message,
                      int errorCode)
Creates an exception with the specified error message and error code.

Parameters:
message - A message containing details on the error that caused the exception
errorCode - the error code of the exception (one of the error code fields of this class)

MediaException

public MediaException(String message,
                      int errorCode,
                      Throwable cause)
Creates an exception with the specified message, errorCode and cause.

Parameters:
message - A message containing details on the error that caused the exception
errorCode - the error code of the exception (one of the error code fields of this class)
cause - the error that caused this exception
Method Detail

getErrorCode

public int getErrorCode()
Obtain the error code value.

Returns:
the error code for the exception.

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

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