Swift 3 custom URLProtocol crashes when converting Error to NSError
问题 I've got a rather large body of Swift 3 code for Mac OS 10.11 and up (using Xcode 8.2.1). There are a number of processes, among them a GUI application and a background service. Both of these use a custom URLProtocol , which is implemented in a framework (imported by both application and service). The protocol sometimes may generate instances of an enum that conforms to Error , which it catches and handles appropriately (generally by using the URLProtocolClient to toss them up to the