public static final class AdsMediaSource.AdLoadException
extends java.io.IOException
MediaSourceEventListener#onLoadError(int, MediaPeriodId, LoadEventInfo, MediaLoadData,
IOException, boolean).| Modifier and Type | Class and Description |
|---|---|
static interface |
AdsMediaSource.AdLoadException.Type
Types of ad load exceptions.
|
| Modifier and Type | Field and Description |
|---|---|
int |
type
The
AdsMediaSource.AdLoadException.Type of the ad load exception. |
static int |
TYPE_AD
Type for when an ad failed to load.
|
static int |
TYPE_AD_GROUP
Type for when an ad group failed to load.
|
static int |
TYPE_ALL_ADS
Type for when all ad groups failed to load.
|
static int |
TYPE_UNEXPECTED
Type for when an unexpected error occurred while loading ads.
|
| Modifier and Type | Method and Description |
|---|---|
static AdsMediaSource.AdLoadException |
createForAd(java.lang.Exception error)
Returns a new ad load exception of
TYPE_AD. |
static AdsMediaSource.AdLoadException |
createForAdGroup(java.lang.Exception error,
int adGroupIndex)
Returns a new ad load exception of
TYPE_AD_GROUP. |
static AdsMediaSource.AdLoadException |
createForAllAds(java.lang.Exception error)
Returns a new ad load exception of
TYPE_ALL_ADS. |
static AdsMediaSource.AdLoadException |
createForUnexpected(java.lang.RuntimeException error)
Returns a new ad load exception of
TYPE_UNEXPECTED. |
java.lang.RuntimeException |
getRuntimeExceptionForUnexpected()
Returns the
RuntimeException that caused the exception if its type is TYPE_UNEXPECTED. |
public static final int TYPE_AD
public static final int TYPE_AD_GROUP
public static final int TYPE_ALL_ADS
public static final int TYPE_UNEXPECTED
@AdsMediaSource.AdLoadException.Type public final int type
AdsMediaSource.AdLoadException.Type of the ad load exception.public static AdsMediaSource.AdLoadException createForAd(java.lang.Exception error)
TYPE_AD.public static AdsMediaSource.AdLoadException createForAdGroup(java.lang.Exception error, int adGroupIndex)
TYPE_AD_GROUP.public static AdsMediaSource.AdLoadException createForAllAds(java.lang.Exception error)
TYPE_ALL_ADS.public static AdsMediaSource.AdLoadException createForUnexpected(java.lang.RuntimeException error)
TYPE_UNEXPECTED.public java.lang.RuntimeException getRuntimeExceptionForUnexpected()
RuntimeException that caused the exception if its type is TYPE_UNEXPECTED.