[swift-evolution] [Pre-Draft] Nil-coalescing and errors
Thorsten Seitz
tseitz42 at icloud.com
Fri Apr 8 09:47:47 CDT 2016
Am 08.04.2016 um 11:59 schrieb Brent Royal-Gordon <brent at architechies.com>:
>> I only wonder whether you really want to repeat Error() all over, possibly with `aString` etc. as argument.
>
> `Error()`, no. `SpimsterKitError.invalidWicketField("a"`), yes, because even if `Int.init(_:)` threw *an* error, it wouldn't throw *your* error.
That's why I thought that in a real use case that logic would likely be extracted.
-Thorsten
More information about the swift-evolution
mailing list