here is a simple code that works for iPhone webview error.
in the .h file add:
IBOutlet UIWebView *webView;
in the .m file add:
}
- (void)webView

UIWebView *)webView didFailLoadWithError

NSError *)error {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"WebView did not load. Please check your internet connection and re-launch the app." delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
[alert show];
[alert release];
}
- (void)viewDidLoad {
[super viewDidLoad];
[webView loadRequest: [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://whatever.com"]]];