Commit c5144dc7 by andrewlewis Committed by Oliver Woodman

Fix catch type in ImaAdsLoader defensive checks

PiperOrigin-RevId: 316079131
parent 28a7e59d
...@@ -715,7 +715,7 @@ public final class ImaAdsLoader ...@@ -715,7 +715,7 @@ public final class ImaAdsLoader
} }
try { try {
handleAdPrepareError(adGroupIndex, adIndexInAdGroup, exception); handleAdPrepareError(adGroupIndex, adIndexInAdGroup, exception);
} catch (Exception e) { } catch (RuntimeException e) {
maybeNotifyInternalError("handlePrepareError", e); maybeNotifyInternalError("handlePrepareError", e);
} }
} }
...@@ -742,7 +742,7 @@ public final class ImaAdsLoader ...@@ -742,7 +742,7 @@ public final class ImaAdsLoader
adPlaybackState = new AdPlaybackState(getAdGroupTimesUs(adsManager.getAdCuePoints())); adPlaybackState = new AdPlaybackState(getAdGroupTimesUs(adsManager.getAdCuePoints()));
hasAdPlaybackState = true; hasAdPlaybackState = true;
updateAdPlaybackState(); updateAdPlaybackState();
} catch (Exception e) { } catch (RuntimeException e) {
maybeNotifyInternalError("onAdsManagerLoaded", e); maybeNotifyInternalError("onAdsManagerLoaded", e);
} }
} }
...@@ -762,7 +762,7 @@ public final class ImaAdsLoader ...@@ -762,7 +762,7 @@ public final class ImaAdsLoader
} }
try { try {
handleAdEvent(adEvent); handleAdEvent(adEvent);
} catch (Exception e) { } catch (RuntimeException e) {
maybeNotifyInternalError("onAdEvent", e); maybeNotifyInternalError("onAdEvent", e);
} }
} }
...@@ -784,7 +784,7 @@ public final class ImaAdsLoader ...@@ -784,7 +784,7 @@ public final class ImaAdsLoader
} else if (isAdGroupLoadError(error)) { } else if (isAdGroupLoadError(error)) {
try { try {
handleAdGroupLoadError(error); handleAdGroupLoadError(error);
} catch (Exception e) { } catch (RuntimeException e) {
maybeNotifyInternalError("onAdError", e); maybeNotifyInternalError("onAdError", e);
} }
} }
...@@ -885,7 +885,7 @@ public final class ImaAdsLoader ...@@ -885,7 +885,7 @@ public final class ImaAdsLoader
adPlaybackState = adPlaybackState =
adPlaybackState.withAdUri(adInfo.adGroupIndex, adInfo.adIndexInAdGroup, adUri); adPlaybackState.withAdUri(adInfo.adGroupIndex, adInfo.adIndexInAdGroup, adUri);
updateAdPlaybackState(); updateAdPlaybackState();
} catch (Exception e) { } catch (RuntimeException e) {
maybeNotifyInternalError("loadAd", e); maybeNotifyInternalError("loadAd", e);
} }
} }
...@@ -959,7 +959,7 @@ public final class ImaAdsLoader ...@@ -959,7 +959,7 @@ public final class ImaAdsLoader
Assertions.checkState(imaAdState != IMA_AD_STATE_NONE); Assertions.checkState(imaAdState != IMA_AD_STATE_NONE);
try { try {
stopAdInternal(); stopAdInternal();
} catch (Exception e) { } catch (RuntimeException e) {
maybeNotifyInternalError("stopAd", e); maybeNotifyInternalError("stopAd", e);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment