title: Can't catch range out of bounds exception in Objective-c
body: <p>I'm getting this error message in xCode: </p>
  
  <pre><code>-[__NSCFString substringWithRange:]: Range {18446744073709551615, 1} out of bounds; string length 71. This will become an exception for apps linked after 10.10 and iOS 8. Warning shown once per app execution.
  </code></pre>
  
  <p>I'm trying to find where in my code this is happening. </p>
  
  <p>I have about a dozen substringWithRange methods in my project. I put try catch blocks around all of them: </p>
  
  <pre><code> @try {
          substring = [s substringWithRange:NSMakeRange(i, j - i)];
      }
      @catch (NSException* e) {
          NSLog(@"Except: %@", e);
      }
  </code></pre>
  
  <p>None of the catch blocks are being executed. </p>
  
  <p>I tried setting my deployment target to 8.4.</p>
  
  <p>Any help would be great thanks!</p>