NSError implementation of initWithCoder: does not call the designated initializer
| Originator: | fpg1503 | ||
| Number: | rdar://23414094 | Date Originated: | 05-Nov-2015 04:07 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 9.1 |
| Classification: | 1 - High | Reproducible: | Always |
Summary: The implementation of -[NSError initWithCoder:] does not call the designated initializer. This is awful because when I subclass NSError I have to duplicate all my initialization logic. Steps to Reproduce: Create an NSError object using initWithCoder: Expected Results: The designated initializer is called (initWithDomain:code:userInfo:). Actual Results: The designated initializer is not called. initWithCoder: calls super init (- [NSObject init]). Version: iOS 9.1 Notes: It took me some time to realize that this was happening. Before that all errors created using NSCoding/NSSecureCoding would mysteriously not work properly. Configuration: iPhone 6s Plus 64GB T-Mobile Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!