Skip to content

Commit

Permalink
Fix catch type in ImaAdsLoader defensive checks
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 316079131
  • Loading branch information
andrewlewis authored and ojw28 committed Jun 17, 2020
1 parent e261b8d commit 8ab3fab
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ public void handlePrepareError(int adGroupIndex, int adIndexInAdGroup, IOExcepti
}
try {
handleAdPrepareError(adGroupIndex, adIndexInAdGroup, exception);
} catch (Exception e) {
} catch (RuntimeException e) {
maybeNotifyInternalError("handlePrepareError", e);
}
}
Expand All @@ -742,7 +742,7 @@ public void onAdsManagerLoaded(AdsManagerLoadedEvent adsManagerLoadedEvent) {
adPlaybackState = new AdPlaybackState(getAdGroupTimesUs(adsManager.getAdCuePoints()));
hasAdPlaybackState = true;
updateAdPlaybackState();
} catch (Exception e) {
} catch (RuntimeException e) {
maybeNotifyInternalError("onAdsManagerLoaded", e);
}
}
Expand All @@ -762,7 +762,7 @@ public void onAdEvent(AdEvent adEvent) {
}
try {
handleAdEvent(adEvent);
} catch (Exception e) {
} catch (RuntimeException e) {
maybeNotifyInternalError("onAdEvent", e);
}
}
Expand All @@ -784,7 +784,7 @@ public void onAdError(AdErrorEvent adErrorEvent) {
} else if (isAdGroupLoadError(error)) {
try {
handleAdGroupLoadError(error);
} catch (Exception e) {
} catch (RuntimeException e) {
maybeNotifyInternalError("onAdError", e);
}
}
Expand Down Expand Up @@ -885,7 +885,7 @@ public void loadAd(AdMediaInfo adMediaInfo, AdPodInfo adPodInfo) {
adPlaybackState =
adPlaybackState.withAdUri(adInfo.adGroupIndex, adInfo.adIndexInAdGroup, adUri);
updateAdPlaybackState();
} catch (Exception e) {
} catch (RuntimeException e) {
maybeNotifyInternalError("loadAd", e);
}
}
Expand Down Expand Up @@ -959,7 +959,7 @@ public void stopAd(AdMediaInfo adMediaInfo) {
Assertions.checkState(imaAdState != IMA_AD_STATE_NONE);
try {
stopAdInternal();
} catch (Exception e) {
} catch (RuntimeException e) {
maybeNotifyInternalError("stopAd", e);
}
}
Expand Down

0 comments on commit 8ab3fab

Please sign in to comment.