Skip to content

Instantly share code, notes, and snippets.

@raylillywhite
Created December 28, 2012 20:11
Show Gist options
  • Save raylillywhite/4401453 to your computer and use it in GitHub Desktop.
Save raylillywhite/4401453 to your computer and use it in GitHub Desktop.
switch (self.code)
{
case HTConnectionErrorUnexpectedContentType:
case HTConnectionErrorBadServerResponse:
case HTConnectionErrorConnectionLost:
case HTConnectionErrorCantReachHost:
case HTConnectionErrorNoHostFound:
case HTConnectionErrorTimeout:
[errorTextDictionary setValue:HTStr(@"S_HTConnectionErrorViewController_CantConnect_Header", @"Oh no", @"Error title - Connection error view")
forKey:kErrorTitleKey];
[errorTextDictionary setValue:HTStr(@"S_HTConnectionErrorViewController_CantConnect_Paragraph", @"We can't reach our servers right now.\n\nYou can view your booking receipts to check into a hotel. Wait a minute or two and then try again.", @"Error message - Connection error view")
forKey:kErrorMessageKey];
break;
case HTConnectionErrorNotFound:
[errorTextDictionary setValue:HTStr(@"S_HTConnectionErrorViewController_NotFound_Header", @"I'm Sorry, Dave", @"Error title - Connection error view - Not found")
forKey:kErrorTitleKey];
[errorTextDictionary setValue:HTStr(@"S_HTConnectionErrorViewController_NotFound_Paragraph", @"I can't find what you're looking for.\n\nYou can view your booking receipts to check into a hotel.", @"Error message - Connection error view - Not found")
forKey:kErrorMessageKey];
break;
case HTConnectionErrorNoConnection:
default:
[errorTextDictionary setValue:HTStr(@"S_HTConnectionErrorViewController_NoConnection_Header", @"No Internet", @"Error title - Connection error view - No internet connection ")
forKey:kErrorTitleKey];
[errorTextDictionary setValue:HTStr(@"S_HTConnectionErrorViewController_NoConnection_Paragraph", @"We are having trouble connecting to the internet.\n\nYou can view your booking receipts to check into a hotel. To book hotels you need to be online.", @"Error message - Connection error view - No internet connection ")
forKey:kErrorMessageKey];
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment