No way to get error domain from ErrorType

Originator:me
Number:rdar://21409270 Date Originated:16-Jun-2015 10:09 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-beta (7A120f)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
In order to use NSError.setUserInfoValueProviderForDomain(errorDomain:provider:), I need to know the error domain for my ErrorType.

Steps to Reproduce:
Try to get the domain from an ErrorType

Expected Results:
I expected a ‘static var’ or other mechanism for retrieving this information

Actual Results:
I have to create a dummy case, create an error of that case, convert to NSError, and fetch the domain from that.

Comments

You can say error._domain error._code is also available.

(this is assuming error is an error type)

By srscottrobbins at Oct. 1, 2015, 5:39 a.m. (reply...)

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!