Skip to content

Commit

Permalink
[ios] handle error without alert dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
alunny committed Apr 20, 2012
1 parent 6a374c0 commit 020621b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/ios/ChildBrowserViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,11 @@ - (void)webViewDidFinishLoad:(UIWebView *)sender

- (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error {
NSLog (@"webView:didFailLoadWithError");
NSLog (@"%@", [error localizedDescription]);
NSLog (@"%@", [error localizedFailureReason]);

[spinner stopAnimating];
addressLabel.text = @"Failed";
if (error != NULL) {
UIAlertView *errorAlert = [[UIAlertView alloc]
initWithTitle: [error localizedDescription]
message: [error localizedFailureReason]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[errorAlert show];
[errorAlert release];
}
}


Expand Down

0 comments on commit 020621b

Please sign in to comment.