Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.contactlist
Class MetaContactListException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.java.sip.communicator.service.contactlist.MetaContactListException
All Implemented Interfaces:
Serializable

public class MetaContactListException
extends RuntimeException

Exceptions of this class get thrown whenever an error occurs while modifying the contents of the MetaContactList. Depending on the type of error that caused them MetaContactListException-s come with a corresponding error code which may have a value among one of the CODE_XXX static fields.

Author:
Emil Ivov
See Also:
Serialized Form

Field Summary
static int CODE_CONTACT_ALREADY_EXISTS_ERROR
          Indicates that the exception was caused by the fact that we tried to add to our contact list a contact that was already in there.
static int CODE_GROUP_ALREADY_EXISTS_ERROR
          Indicates that the exception was caused by the fact that we tried to add to our contact list a group that was already in there.
static int CODE_LOCAL_IO_ERROR
          Indicates that an error has occurred while performing a local IO operation (e.g.
static int CODE_MOVE_CONTACT_ERROR
          Indicates that the exception was caused by the fact that we tried to move a contact that cannot be moved or an error occur during move.
static int CODE_NETWORK_ERROR
          Indicates that a failure has occurred while trying to communicate through the network.
static int CODE_NOT_SUPPORTED_OPERATION
          Indicates that the last operation is not supported from underling protocol.
static int CODE_REMOVE_GROUP_ERROR
          Indicates that the exception was caused by the fact that we tried to remove a group that cannot be removed or an error occur during remove.
static int CODE_UNKNOWN_ERROR
          Indicates that the error which caused the exception was either unknown or did not correspond to any of the other error codes
 
Constructor Summary
MetaContactListException(String message, Exception cause, int code)
          Creates a MetaContactListException with the specified message cause and code.
MetaContactListException(String message, int code)
          Creates a MetaContactListException with the specified message error code.
 
Method Summary
 int getErrorCode()
          Returns an int describing the nature of the exception.
 
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

CODE_LOCAL_IO_ERROR

public static final int CODE_LOCAL_IO_ERROR
Indicates that an error has occurred while performing a local IO operation (e.g. while writing in a file).

See Also:
Constant Field Values

CODE_NETWORK_ERROR

public static final int CODE_NETWORK_ERROR
Indicates that a failure has occurred while trying to communicate through the network.

See Also:
Constant Field Values

CODE_CONTACT_ALREADY_EXISTS_ERROR

public static final int CODE_CONTACT_ALREADY_EXISTS_ERROR
Indicates that the exception was caused by the fact that we tried to add to our contact list a contact that was already in there.

See Also:
Constant Field Values

CODE_GROUP_ALREADY_EXISTS_ERROR

public static final int CODE_GROUP_ALREADY_EXISTS_ERROR
Indicates that the exception was caused by the fact that we tried to add to our contact list a group that was already in there.

See Also:
Constant Field Values

CODE_UNKNOWN_ERROR

public static final int CODE_UNKNOWN_ERROR
Indicates that the error which caused the exception was either unknown or did not correspond to any of the other error codes

See Also:
Constant Field Values

CODE_REMOVE_GROUP_ERROR

public static final int CODE_REMOVE_GROUP_ERROR
Indicates that the exception was caused by the fact that we tried to remove a group that cannot be removed or an error occur during remove.

See Also:
Constant Field Values

CODE_MOVE_CONTACT_ERROR

public static final int CODE_MOVE_CONTACT_ERROR
Indicates that the exception was caused by the fact that we tried to move a contact that cannot be moved or an error occur during move.

See Also:
Constant Field Values

CODE_NOT_SUPPORTED_OPERATION

public static final int CODE_NOT_SUPPORTED_OPERATION
Indicates that the last operation is not supported from underling protocol.

See Also:
Constant Field Values
Constructor Detail

MetaContactListException

public MetaContactListException(String message,
                                Exception cause,
                                int code)
Creates a MetaContactListException with the specified message cause and code.

Parameters:
message - a human readable message describing the exception.
cause - the Exception/Error (if any) that caused this Exception.
code - one of the status CODE_XXX variable, describing the nature of the exception.

MetaContactListException

public MetaContactListException(String message,
                                int code)
Creates a MetaContactListException with the specified message error code.

Parameters:
message - a human readable message describing the exception.
code - one of the status CODE_XXX variable, describing the nature of the exception.
Method Detail

getErrorCode

public int getErrorCode()
Returns an int describing the nature of the exception.

Returns:
one of the static int CODE_XXX fields of this class.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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