Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Class OperationFailedException

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

public class OperationFailedException
extends Exception

OperationFailedException indicates an exception that occurred in the API.

OperationFailedException contains an error code that gives more information on the exception. The application can obtain the error code using getErrorCode(). The error code values are defined in the OperationFailedException fields.

Author:
Emil Ivov
See Also:
Serialized Form

Field Summary
static int AUTHENTICATION_CANCELED
          Indicates that the authentication process has been canceled.
static int AUTHENTICATION_FAILED
          Indicates that authentication with a server has failed.
static int CHAT_ROOM_NOT_JOINED
          Indicates that we are currently not joined to the chat room, over which we try to perform an operation.
static int CONTACT_GROUP_ALREADY_EXISTS
          Indicates that a user has tried to create a group that already exist.
static int FORBIDDEN
          Indicates that the user is currently not allowed to perform the operation that failed.
static int GENERAL_ERROR
          Set when no other error code can describe the exception that occurred.
static int IDENTIFICATION_CONFLICT
          Indicates that the user is trying to perform an operation with an identifier that was already in use on the target resource (e.g.
static int ILLEGAL_ARGUMENT
          Indicates that the exception was thrown because a method has been passed an illegal or inappropriate argument.
static int INTERNAL_ERROR
          Set when an operation fails for implementation specific reasons.
static int INTERNAL_SERVER_ERROR
          Set when an operation fails for an error that has occurred on the server side.
static int INVALID_ACCOUNT_PROPERTIES
          Indicates that a user has entered wrong account properties, like wrong port for example.
static int NETWORK_FAILURE
          Set when command fails due to a failure in network communications or a transport error.
static int NOT_ENOUGH_PRIVILEGES
          Indicates that the exception was thrown, because the user doesn't have enough privileges.
static int NOT_FOUND
          Indicates that the user is trying to perform the current operation on a resource that does not exist.
static int NOT_SUPPORTED_OPERATION
          The operation that throws this exception is not supported.
static int OPERATION_CANCELED
          Indicates that the operation has been canceled by the user.
static int PROVIDER_NOT_REGISTERED
          Set to indicate that a provider needs to be registered or signed on a public service before calling the method that threw the exception.
static int REGISTRATION_REQUIRED
          Indicates that the user is required to be registered before performing the operation.
static int SERVER_NOT_SPECIFIED
          Indicates that the operation has been canceled because of a missing server information.
static int SUBSCRIPTION_ALREADY_EXISTS
          Indicates that a user has tried to subscribe to a contact that already had an active subscription.
 
Constructor Summary
OperationFailedException(String message, int errorCode)
          Creates an exception with the specified error message and error code.
OperationFailedException(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_FAILURE

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

See Also:
Constant Field Values

PROVIDER_NOT_REGISTERED

public static final int PROVIDER_NOT_REGISTERED
Set to indicate that a provider needs to be registered or signed on a public service 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

INTERNAL_SERVER_ERROR

public static final int INTERNAL_SERVER_ERROR
Set when an operation fails for an error that has occurred on the server side.

See Also:
Constant Field Values

SUBSCRIPTION_ALREADY_EXISTS

public static final int SUBSCRIPTION_ALREADY_EXISTS
Indicates that a user has tried to subscribe to a contact that already had an active subscription.

See Also:
Constant Field Values

CONTACT_GROUP_ALREADY_EXISTS

public static final int CONTACT_GROUP_ALREADY_EXISTS
Indicates that a user has tried to create a group that already exist.

See Also:
Constant Field Values

INVALID_ACCOUNT_PROPERTIES

public static final int INVALID_ACCOUNT_PROPERTIES
Indicates that a user has entered wrong account properties, like wrong port for example.

See Also:
Constant Field Values

AUTHENTICATION_FAILED

public static final int AUTHENTICATION_FAILED
Indicates that authentication with a server has failed.

See Also:
Constant Field Values

FORBIDDEN

public static final int FORBIDDEN
Indicates that the user is currently not allowed to perform the operation that failed.

See Also:
Constant Field Values

NOT_FOUND

public static final int NOT_FOUND
Indicates that the user is trying to perform the current operation on a resource that does not exist.

See Also:
Constant Field Values

IDENTIFICATION_CONFLICT

public static final int IDENTIFICATION_CONFLICT
Indicates that the user is trying to perform an operation with an identifier that was already in use on the target resource (e.g. log with a nickname that is already in use in a chat room, or create a chat room on a server that already contains a room with the same ID).

See Also:
Constant Field Values

ILLEGAL_ARGUMENT

public static final int ILLEGAL_ARGUMENT
Indicates that the exception was thrown because a method has been passed an illegal or inappropriate argument.

See Also:
Constant Field Values

NOT_ENOUGH_PRIVILEGES

public static final int NOT_ENOUGH_PRIVILEGES
Indicates that the exception was thrown, because the user doesn't have enough privileges. Meant to be used by multi user chat to indicate that the user is trying to make an operation, which requires admin or owner privileges.

See Also:
Constant Field Values

REGISTRATION_REQUIRED

public static final int REGISTRATION_REQUIRED
Indicates that the user is required to be registered before performing the operation. This property is initially created to take care of chat room join error.

See Also:
Constant Field Values

CHAT_ROOM_NOT_JOINED

public static final int CHAT_ROOM_NOT_JOINED
Indicates that we are currently not joined to the chat room, over which we try to perform an operation.

See Also:
Constant Field Values

AUTHENTICATION_CANCELED

public static final int AUTHENTICATION_CANCELED
Indicates that the authentication process has been canceled.

See Also:
Constant Field Values

OPERATION_CANCELED

public static final int OPERATION_CANCELED
Indicates that the operation has been canceled by the user.

See Also:
Constant Field Values

SERVER_NOT_SPECIFIED

public static final int SERVER_NOT_SPECIFIED
Indicates that the operation has been canceled because of a missing server information.

See Also:
Constant Field Values

NOT_SUPPORTED_OPERATION

public static final int NOT_SUPPORTED_OPERATION
The operation that throws this exception is not supported.

See Also:
Constant Field Values
Constructor Detail

OperationFailedException

public OperationFailedException(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)

OperationFailedException

public OperationFailedException(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.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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