Apple’s sense of humor

I had a good laugh today when I got a nice error from XCode.

I made a mistake and passed the wrong variable to NSMutableArray::initWithCapacity.The value of the variable was -1 which, obviously, got cast to an unsigned and caused a crash. But I found the error message funny.

Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[__NSPlaceholderArray initWithCapacity:]: capacity (4294967295) is ridiculous’

Thanks XCode team, you made my day brighter!


  1. 我就是随便看看

  2. great and nice info dude, can i share it?

Leave a Reply

Your email address will not be published. Required fields are marked *