MediationAdError

public final class MediationAdError


Error information about why a mediation operation failed, as reported by the third party SDK.

Summary

Constants

static final @NonNull String

Default error domain name for the Google Mobile Ads SDK.

static final @NonNull String

The undefined error domain.

Public constructors

MediationAdError(int code, @NonNull String message, @NonNull String domain)

Public methods

int

The error code.

final @NonNull String

The domain of the error, either GOOGLE_MOBILE_ADS_DOMAIN, supplied by the third party SDK or UNDEFINED_DOMAIN.

@NonNull String

A message detailing the error.

Constants

GOOGLE_MOBILE_ADS_DOMAIN

public static final @NonNull String GOOGLE_MOBILE_ADS_DOMAIN

Default error domain name for the Google Mobile Ads SDK.

UNDEFINED_DOMAIN

public static final @NonNull String UNDEFINED_DOMAIN

The undefined error domain.

The Google Mobile Ads SDK returns this domain when converting error information from legacy mediation adapter callbacks that don't supply their own domain.

Public constructors

MediationAdError

public MediationAdError(int code, @NonNull String message, @NonNull String domain)
Parameters
int code

The error code.

@NonNull String message

A message detailing the error.

@NonNull String domain

The domain of the error, either GOOGLE_MOBILE_ADS_DOMAIN, supplied by the third party SDK or UNDEFINED_DOMAIN. If GOOGLE_MOBILE_ADS_DOMAIN, code will be one of LoadAdError.ErrorCode.

Public methods

getCode

public int getCode()

The error code.

getDomain

public final @NonNull String getDomain()

The domain of the error, either GOOGLE_MOBILE_ADS_DOMAIN, supplied by the third party SDK or UNDEFINED_DOMAIN. If GOOGLE_MOBILE_ADS_DOMAIN, code will be one of LoadAdError.ErrorCode.

getMessage

public @NonNull String getMessage()

A message detailing the error.