Permalink
Browse files

Better error logging

  • Loading branch information...
1 parent b6bc088 commit 16fe220b8b5743d3421aade16d35d844f3fe8f43 @drewcrawford committed Feb 22, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 DCAKit/NSError+LessTerrible.m
@@ -31,7 +31,10 @@ - (NSString*) lessTerribleRecoverySuggestion {
-(void) present {
[self log];
- UIAlertView *uav = [[UIAlertView alloc] initWithTitle:[self lessTerribleFailureReason] message:[self lessTerribleRecoverySuggestion] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
+ NSString *title = [NSString stringWithFormat:@"%@ code %d",self.domain,self.code];
+ NSString *message = [NSString stringWithFormat:@"%@\n%@",self.lessTerribleFailureReason,self.lessTerribleRecoverySuggestion];
+
+ UIAlertView *uav = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
dispatch_async(dispatch_get_main_queue(), ^{
[uav show];
});

0 comments on commit 16fe220

Please sign in to comment.