Stay organized with collections Save and categorize content based on your preferences.

AdsMediaSource.AdLoadException

class AdsMediaSource.AdLoadException : IOException


Wrapper for exceptions that occur while loading ads, which are notified via onLoadError.

Summary

Nested types

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = TYPE_USE)
@IntDef(value = )
annotation AdsMediaSource.AdLoadException.Type

Types of ad load exceptions.

Constants

const Int

Type for when an ad failed to load.

const Int

Type for when an ad group failed to load.

const Int

Type for when all ad groups failed to load.

const Int

Type for when an unexpected error occurred while loading ads.

Public constructors

Public functions

java-static AdsMediaSource.AdLoadException!

Returns a new ad load exception of TYPE_AD.

java-static AdsMediaSource.AdLoadException!
createForAdGroup(error: Exception!, adGroupIndex: Int)

Returns a new ad load exception of TYPE_AD_GROUP.

java-static AdsMediaSource.AdLoadException!

Returns a new ad load exception of TYPE_ALL_ADS.

java-static AdsMediaSource.AdLoadException!

Returns a new ad load exception of TYPE_UNEXPECTED.

RuntimeException!

Returns the RuntimeException that caused the exception if its type is TYPE_UNEXPECTED.

Public properties

Int

The Type of the ad load exception.

Constants

TYPE_AD

const val TYPE_AD = 0: Int

Type for when an ad failed to load. The ad will be skipped.

TYPE_AD_GROUP

const val TYPE_AD_GROUP = 1: Int

Type for when an ad group failed to load. The ad group will be skipped.

TYPE_ALL_ADS

const val TYPE_ALL_ADS = 2: Int

Type for when all ad groups failed to load. All ads will be skipped.

TYPE_UNEXPECTED

const val TYPE_UNEXPECTED = 3: Int

Type for when an unexpected error occurred while loading ads. All ads will be skipped.

Public constructors

AdLoadException

AdLoadException()

Public functions

createForAd

java-static fun createForAd(error: Exception!): AdsMediaSource.AdLoadException!

Returns a new ad load exception of TYPE_AD.

createForAdGroup

java-static fun createForAdGroup(error: Exception!, adGroupIndex: Int): AdsMediaSource.AdLoadException!

Returns a new ad load exception of TYPE_AD_GROUP.

createForAllAds

java-static fun createForAllAds(error: Exception!): AdsMediaSource.AdLoadException!

Returns a new ad load exception of TYPE_ALL_ADS.

createForUnexpected

java-static fun createForUnexpected(error: RuntimeException!): AdsMediaSource.AdLoadException!

Returns a new ad load exception of TYPE_UNEXPECTED.

getRuntimeExceptionForUnexpected

fun getRuntimeExceptionForUnexpected(): RuntimeException!

Returns the RuntimeException that caused the exception if its type is TYPE_UNEXPECTED.

Public properties

type

@AdsMediaSource.AdLoadException.Type
val typeInt

The Type of the ad load exception.