Re: [swift-users] Rethrows issue

2017-12-30 Thread Nevin Brackett-Rozinsky via swift-users
So, I know this doesn’t actually address your issue, but I think it is important to clarify that “rethrows” does not guarantee anything about the *type* of error thrown by a function. What “rethrows” implies is that the function *will not throw* unless at least one of its arguments throws. In part

[swift-users] Rethrows issue

2017-12-30 Thread Brent Royal-Gordon via swift-users
I need to do something like this: func withPredicateErrors(_ predicate: (Element) throws -> Bool, do body: ((Element) -> Bool) -> Return) rethrows -> Return { var caught: Error? let value = body { elem in do { return try predicate(elem)