Re: NSDecimalNumber nil parameter to -decimalNumberByAdding: causes Mach exception EXC_BAD_ACCESS
Re: NSDecimalNumber nil parameter to -decimalNumberByAdding: causes Mach exception EXC_BAD_ACCESS
- Subject: Re: NSDecimalNumber nil parameter to -decimalNumberByAdding: causes Mach exception EXC_BAD_ACCESS
- From: Kyle Sluder <email@hidden>
- Date: Mon, 13 Apr 2009 17:31:45 -0400
On Mon, Apr 13, 2009 at 5:29 PM, email@hidden
<email@hidden> wrote:
> Whatever way you slice it, bug or not, this is fairly toxic behaviour.
You can't dereference a null pointer, and you can't divide by zero.
Must every possible occurrence of these be marked?
nil is a very special value. Sometimes the API attaches a meaning to
it -- for example, "pass nil to specify no options." Other times, the
API expects you to have an object on hand. I wouldn't complain if all
I got were strange looks when I asked you to add 3 + Banana.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden