Skip to content

Instantly share code, notes, and snippets.

@mikeymicrophone
Created August 7, 2010 19:39
Show Gist options
  • Save mikeymicrophone/513108 to your computer and use it in GitHub Desktop.
Save mikeymicrophone/513108 to your computer and use it in GitHub Desktop.
NSArray *comments;
@try {
comments = [self allFromXMLData:res.body];
}
@catch (NSRangeException *e) {
comments = [NSArray array];
}
@catch (NSException *e) {
comments = [NSArray array];
}
return comments;
TalkToHer[65438:6603] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSArray objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** Call stack at first throw:
(
0 CoreFoundation 0x02932919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x02a805de objc_exception_throw + 47
2 CoreFoundation 0x0292858c -[__NSArrayI objectAtIndex:] + 236
3 TalkToHer 0x00009feb -[FromXMLElementDelegate parser:didEndElement:namespaceURI:qualifiedName:] + 425
4 Foundation 0x0017bcc1 _endElementNs + 453
5 libxml2.2.dylib 0x02d9deb6 xmlParseXMLDecl + 1353
6 libxml2.2.dylib 0x02da8bc1 xmlParseChunk + 3985
7 Foundation 0x0017b4c2 -[NSXMLParser parse] + 321
8 TalkToHer 0x0000b191 +[NSObject(XMLSerializableSupport) fromXMLData:] + 201
9 TalkToHer 0x00031ab0 +[Rating findAllFor:] + 320
10 TalkToHer 0x00032d8f -[FirstClassContentPiece(Ratable) updateRatings] + 96
11 TalkToHer 0x00004da3 __-[InspirationController tableView:didSelectRowAtIndexPath:]_block_invoke_3 + 33
12 libSystem.B.dylib 0x9792efe4 _dispatch_call_block_and_release + 16
13 libSystem.B.dylib 0x97921a4c _dispatch_queue_drain + 249
14 libSystem.B.dylib 0x979214a8 _dispatch_queue_invoke + 50
15 libSystem.B.dylib 0x979212be _dispatch_worker_thread2 + 240
16 libSystem.B.dylib 0x97920d41 _pthread_wqthread + 390
17 libSystem.B.dylib 0x97920b86 start_wqthread + 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment