FileDocCategorySizeDatePackage
ImException.javaAPI DocAndroid 1.5 API2519Wed May 06 22:42:46 BST 2009com.android.im.engine

ImException

public class ImException extends Exception
A generic exception that is thrown by the IM engine. If it's caused by an error condition returned by the IM server, an IMError is associated with it.

Fields Summary
private ImErrorInfo
mError
Constructors Summary
public ImException(String message)
Creates a new ImException with the specified detail message.

param
message the detail message.

        super(message);
    
public ImException(ImErrorInfo error)
Creates a new ImException with the IMError which was the cause of the exception.

param
error the cause of the exception.

        super(error.getDescription());
        mError = error;
    
public ImException(Throwable cause)
Creates a new ImException with the specified cause.

param
cause the cause.

        super(cause);
    
public ImException(String message, Throwable cause)
Creates a new ImException with the specified detail message and cause.

param
message the detail message.
param
cause the cause.

        super(message, cause);
    
public ImException(int imErrorCode, String description)
Creates a new ImException with specified IM error code and description

param
imErrorCode
param
string

        this(new ImErrorInfo(imErrorCode, description));
    
Methods Summary
public ImErrorInfogetImError()
Gets the IMError which caused the exception or null if there isn't one.

return
the IMError which caused the exception.

        return mError;
    
public voidprintStackTrace()

        System.err.println("ImError: " + mError);
        super.printStackTrace();