Re: macOS 10.13 suggestion for init() throws
Re: macOS 10.13 suggestion for init() throws
- Subject: Re: macOS 10.13 suggestion for init() throws
- From: Jens Alfke <email@hidden>
- Date: Tue, 28 Feb 2017 09:27:06 -0800
> On Feb 28, 2017, at 4:56 AM, Daryle Walker <email@hidden> wrote:
>
> Could we have a NSDocument.init() that throws in the next macOS? That would translate to a "initWithError" in Objective C (I think). It would be the new primary initializer, with the current one calling it and dropping any error to oblivion.
If you’re doing anything that might fail, you should do it in an override of one of the other NSDocument initializers, which do return errors. The basic -init method is explicitly documented as not allowing failure.
—Jens
_______________________________________________
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