Skip to content

Commit

Permalink
log errors as warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
koenpunt committed Sep 28, 2017
1 parent ee73cf9 commit e864ac4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class Example extends Component {
() => console.log('rewardedVideoDidLoad')
);
AdMobRewarded.addEventListener('rewardedVideoDidFailToLoad',
(error) => console.log('rewardedVideoDidFailToLoad', error)
(error) => console.warn(error)
);
AdMobRewarded.addEventListener('rewardedVideoDidOpen',
() => console.log('rewardedVideoDidOpen')
Expand All @@ -59,14 +59,14 @@ export default class Example extends Component {
AdMobRewarded.addEventListener('rewardedVideoDidClose',
() => {
console.log('rewardedVideoDidClose');
AdMobRewarded.requestAd().catch(error => console.log(error));
AdMobRewarded.requestAd().catch(error => console.warn(error));
}
);
AdMobRewarded.addEventListener('rewardedVideoWillLeaveApplication',
() => console.log('rewardedVideoWillLeaveApplication')
);

AdMobRewarded.requestAd().catch(error => console.log(error));
AdMobRewarded.requestAd().catch(error => console.warn(error));

AdMobInterstitial.setTestDevices([AdMobInterstitial.simulatorId]);
AdMobInterstitial.setAdUnitID('ca-app-pub-3940256099942544/4411468910');
Expand All @@ -75,22 +75,22 @@ export default class Example extends Component {
() => console.log('interstitialDidLoad')
);
AdMobInterstitial.addEventListener('interstitialDidFailToLoad',
(error) => console.log('interstitialDidFailToLoad', error)
(error) => console.warn(error)
);
AdMobInterstitial.addEventListener('interstitialDidOpen',
() => console.log('interstitialDidOpen')
);
AdMobInterstitial.addEventListener('interstitialDidClose',
() => {
console.log('interstitialDidClose');
AdMobInterstitial.requestAd().catch(error => console.log(error));
AdMobInterstitial.requestAd().catch(error => console.warn(error));
}
);
AdMobInterstitial.addEventListener('interstitialWillLeaveApplication',
() => console.log('interstitialWillLeaveApplication')
);

AdMobInterstitial.requestAd().catch(error => console.log(error));
AdMobInterstitial.requestAd().catch(error => console.warn(error));
}

componentWillUnmount() {
Expand All @@ -99,11 +99,11 @@ export default class Example extends Component {
}

showRewarded() {
AdMobRewarded.showAd().catch(error => console.log(error));
AdMobRewarded.showAd().catch(error => console.warn(error));
}

showInterstitial() {
AdMobInterstitial.showAd().catch(error => console.log(error));
AdMobInterstitial.showAd().catch(error => console.warn(error));
}

render() {
Expand Down

0 comments on commit e864ac4

Please sign in to comment.