FileDocCategorySizeDatePackage
ResultException.javaAPI DocAndroid 1.5 API2450Wed May 06 22:42:02 BST 2009com.android.internal.telephony.gsm.stk

ResultException

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

Fields Summary
private ResultCode
mResult
private int
mAdditionalInfo
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!");
        }

        mResult = result;
        mAdditionalInfo = -1;
    
public ResultException(ResultCode result, int additionalInfo)

        super();

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

        mResult = result;
        mAdditionalInfo = additionalInfo;
    
Methods Summary
public intadditionalInfo()

        return mAdditionalInfo;
    
public booleanhasAdditionalInfo()

        return mAdditionalInfo >= 0;
    
public ResultCoderesult()

        return mResult;