docs/doc/reference/com/google/android/exoplayer2/source/ads/AdsMediaSource.AdLoadException.html
Package com.google.android.exoplayer2.source.ads
All Implemented Interfaces:SerializableEnclosing class:AdsMediaSource
public static final classAdsMediaSource.AdLoadExceptionextends[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Wrapper for exceptions that occur while loading ads, which are notified via MediaSourceEventListener.onLoadError(int, MediaPeriodId, LoadEventInfo, MediaLoadData, IOException, boolean).
See Also:Serialized Form
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | AdsMediaSource.AdLoadException.Type |
Types of ad load exceptions.
|
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| @com.google.android.exoplayer2.source.ads.AdsMediaSource.AdLoadException.Type 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.
|
All Methods Static Methods Instance Methods Concrete Methods | Modifier and Type | Method | 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
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
public static final int TYPE_AD
Type for when an ad failed to load. The ad will be skipped. See Also:Constant Field Values
-
public static final int TYPE_AD_GROUP
Type for when an ad group failed to load. The ad group will be skipped. See Also:Constant Field Values
-
public static final int TYPE_ALL_ADS
Type for when all ad groups failed to load. All ads will be skipped. See Also:Constant Field Values
-
public static final int TYPE_UNEXPECTED
Type for when an unexpected error occurred while loading ads. All ads will be skipped. See Also:Constant Field Values
-
public final @com.google.android.exoplayer2.source.ads.AdsMediaSource.AdLoadException.Type int type
The AdsMediaSource.AdLoadException.Type of the ad load exception.
-
public static[AdsMediaSource.AdLoadException](AdsMediaSource.AdLoadException.html "class in com.google.android.exoplayer2.source.ads")createForAd([Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")error)
Returns a new ad load exception of TYPE_AD.
-
public static[AdsMediaSource.AdLoadException](AdsMediaSource.AdLoadException.html "class in com.google.android.exoplayer2.source.ads")createForAdGroup([Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")error,
int adGroupIndex)
Returns a new ad load exception of TYPE_AD_GROUP.
-
public static[AdsMediaSource.AdLoadException](AdsMediaSource.AdLoadException.html "class in com.google.android.exoplayer2.source.ads")createForAllAds([Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")error)
Returns a new ad load exception of TYPE_ALL_ADS.
-
public static[AdsMediaSource.AdLoadException](AdsMediaSource.AdLoadException.html "class in com.google.android.exoplayer2.source.ads")createForUnexpected([RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html "class or interface in java.lang")error)
Returns a new ad load exception of TYPE_UNEXPECTED.
-
public[RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html "class or interface in java.lang")getRuntimeExceptionForUnexpected()
Returns the RuntimeException that caused the exception if its type is TYPE_UNEXPECTED.