public static final class AdsMediaSource.AdLoadException extends 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(Exception error)
Returns a new ad load exception of
TYPE_AD . |
static AdsMediaSource.AdLoadException |
createForAdGroup(Exception error,
int adGroupIndex)
Returns a new ad load exception of
TYPE_AD_GROUP . |
static AdsMediaSource.AdLoadException |
createForAllAds(Exception error)
Returns a new ad load exception of
TYPE_ALL_ADS . |
static AdsMediaSource.AdLoadException |
createForUnexpected(RuntimeException error)
Returns a new ad load exception of
TYPE_UNEXPECTED . |
RuntimeException |
getRuntimeExceptionForUnexpected()
Returns the
RuntimeException that caused the exception if its type is TYPE_UNEXPECTED . |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
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(Exception error)
TYPE_AD
.public static AdsMediaSource.AdLoadException createForAdGroup(Exception error, int adGroupIndex)
TYPE_AD_GROUP
.public static AdsMediaSource.AdLoadException createForAllAds(Exception error)
TYPE_ALL_ADS
.public static AdsMediaSource.AdLoadException createForUnexpected(RuntimeException error)
TYPE_UNEXPECTED
.public RuntimeException getRuntimeExceptionForUnexpected()
RuntimeException
that caused the exception if its type is TYPE_UNEXPECTED
.