MeasurementException

public class MeasurementException
extends AdServicesException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ android.adservices.exceptions.AdServicesException
         ↳ android.adservices.exceptions.MeasurementException


Exception thrown by Measurement API.

Summary

Public constructors

MeasurementException(int resultCode)

Initializes an MeasurementException with no message.

MeasurementException(int resultCode, String message)

Initializes an MeasurementException with a result code and message.

MeasurementException(int resultCode, String message, Throwable cause)

Initializes an MeasurementException with a result code, message and cause.

Public methods

int getResultCode()

Returns the result code this exception was constructed with.

Inherited methods

Public constructors

MeasurementException

public MeasurementException (int resultCode)

Initializes an MeasurementException with no message.

Parameters
resultCode int: The resultCode. Value is MeasurementManager.RESULT_OK, MeasurementManager.RESULT_INTERNAL_ERROR, MeasurementManager.RESULT_INVALID_ARGUMENT, or MeasurementManager.RESULT_IO_ERROR

MeasurementException

public MeasurementException (int resultCode, 
                String message)

Initializes an MeasurementException with a result code and message.

Parameters
resultCode int: The resultCode. Value is MeasurementManager.RESULT_OK, MeasurementManager.RESULT_INTERNAL_ERROR, MeasurementManager.RESULT_INVALID_ARGUMENT, or MeasurementManager.RESULT_IO_ERROR

message String: The detail message (which is saved for later retrieval by the Throwable.getMessage() method). This value cannot be null.

MeasurementException

public MeasurementException (int resultCode, 
                String message, 
                Throwable cause)

Initializes an MeasurementException with a result code, message and cause.

Parameters
resultCode int: The resultCode. Value is MeasurementManager.RESULT_OK, MeasurementManager.RESULT_INTERNAL_ERROR, MeasurementManager.RESULT_INVALID_ARGUMENT, or MeasurementManager.RESULT_IO_ERROR

message String: The detail message (which is saved for later retrieval by the Throwable.getMessage() method). This value cannot be null.

cause Throwable: The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

Public methods

getResultCode

public int getResultCode ()

Returns the result code this exception was constructed with.

Returns
int The resultCode. Value is MeasurementManager.RESULT_OK, MeasurementManager.RESULT_INTERNAL_ERROR, MeasurementManager.RESULT_INVALID_ARGUMENT, or MeasurementManager.RESULT_IO_ERROR