Skip to content

Commit

Permalink
exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
certen committed Jan 10, 2014
1 parent 6c20637 commit d6c8fd3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Mac/Appirater.cs
Expand Up @@ -406,21 +406,29 @@ void IncrementSignificantEventCount ()
[Export(SELECTOR_INCREMENT_AND_RATE)]
void IncrementAndRate (NSNumber _canPromptForRating)
{
using (new NSAutoreleasePool ()) {
IncrementUseCount ();
if (_canPromptForRating.BoolValue && RatingConditionsHaveBeenMet () && ConnectedToNetwork ())
InvokeOnMainThread (ShowRatingAlert);
try {
using (new NSAutoreleasePool ()) {
IncrementUseCount ();
if (_canPromptForRating.BoolValue && RatingConditionsHaveBeenMet () && ConnectedToNetwork ())
InvokeOnMainThread (ShowRatingAlert);
}
}
catch {
}
}

[Export(SELECTOR_INCREMENT_EVENT_AND_RATE)]
void IncrementSignificantEventAndRate (NSNumber _canPromptForRating)
{
try {
using (new NSAutoreleasePool ()) {
IncrementSignificantEventCount ();
if (_canPromptForRating.BoolValue && RatingConditionsHaveBeenMet () && ConnectedToNetwork ())
InvokeOnMainThread (ShowRatingAlert);
}
}
catch {
}
}


Expand Down

0 comments on commit d6c8fd3

Please sign in to comment.