FileDocCategorySizeDatePackage
ResultException.javaAPI DocAndroid 5.1 API3076Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony.cat

ResultException

public class ResultException extends CatException
Class for errors in the Result object. {@hide}

Fields Summary
private ResultCode
mResult
private int
mAdditionalInfo
private String
mExplanation
Constructors Summary
public ResultException(ResultCode result)

        super();

        // ETSI TS 102 223, 8.12 -- For the general results '20', '21', '26',
        // '38', '39', '3A', '3C', and '3D', it is mandatory for the terminal
        // to provide a specific cause value as additional information.
        switch (result) {
            case TERMINAL_CRNTLY_UNABLE_TO_PROCESS:    // 0x20
            case NETWORK_CRNTLY_UNABLE_TO_PROCESS:     // 0x21
            case LAUNCH_BROWSER_ERROR:                 // 0x26
            case MULTI_CARDS_CMD_ERROR:                // 0x38
            case USIM_CALL_CONTROL_PERMANENT:          // 0x39
            case BIP_ERROR:                            // 0x3a
            case FRAMES_ERROR:                         // 0x3c
            case MMS_ERROR:                            // 0x3d
                throw new AssertionError(
                        "For result code, " + result +
                        ", additional information must be given!");
            default:
                break;
        }

        mResult = result;
        mAdditionalInfo = -1;
        mExplanation = "";
    
public ResultException(ResultCode result, String explanation)

        this(result);
        mExplanation = explanation;
    
public ResultException(ResultCode result, int additionalInfo)

        this(result);

        if (additionalInfo < 0) {
            throw new AssertionError(
                    "Additional info must be greater than zero!");
        }

        mAdditionalInfo = additionalInfo;
    
public ResultException(ResultCode result, int additionalInfo, String explanation)

        this(result, additionalInfo);
        mExplanation = explanation;
    
Methods Summary
public intadditionalInfo()

        return mAdditionalInfo;
    
public java.lang.Stringexplanation()

        return mExplanation;
    
public booleanhasAdditionalInfo()

        return mAdditionalInfo >= 0;
    
public ResultCoderesult()

        return mResult;
    
public java.lang.StringtoString()

        return "result=" + mResult + " additionalInfo=" + mAdditionalInfo +
                " explantion=" + mExplanation;