• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: index out of bounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: index out of bounds


  • Subject: Re: index out of bounds
  • From: "I. Savant" <email@hidden>
  • Date: Fri, 7 Jul 2006 08:41:48 -0400

Rex:

You should never just leave an exception in a production application. All sorts of bad stuff can happen (stuff you may not even be able to foresee from the narrow perspective of one developer testing his app).

Daniel Jalkut posted an excellent way of testing to make sure your index is valid for the array you're using it against. *Always* fix (ie, prevent or catch-and-properly-deal-with) exceptions.

--
I.S.

On Jul 4, 2006, at 10:32 PM, Rex Fernando wrote:

I have a table with data in it. When someone clicks the remove button, I get the selection array and remove all the objects in it. If there is an empty selection, I am told index out of bounds, naturally, because there are no items in the array. Can I just leave this error? Or should I make a catch for it?

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >index out of bounds (From: Rex Fernando <email@hidden>)
 >Re: index out of bounds (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: Core Data: Single entity in NSDocument?
  • Next by Date: Re: Newbie Q : writing into a text view programmatically
  • Previous by thread: Re: index out of bounds
  • Next by thread: turning off anti-aliasing
  • Index(es):
    • Date
    • Thread