[swift-users] Every non-trivial Swift function should throw, right?
Dave Abrahams
dabrahams at apple.com
Sun Mar 6 00:02:03 CST 2016
on Sat Mar 05 2016, Erica Sadun <swift-users-AT-swift.org> wrote:
> I'm hopping in here ridiculously late, but wasn't someone going to
> propose a vanilla universal stdlib error type along the lines of
>
> struct Error: ErrorType {
> let reason: String
> }
>
> (preferably with auto-captured location context
> (http://ericasadun.com/2015/08/27/capturing-context-swiftlang/
> <http://ericasadun.com/2015/08/27/capturing-context-swiftlang/>) and a
> custom mutable dictionary.)
I know some people around here really want us to standardize on NSError
for this purpose. If you have good reasons why we shouldn't, now would
be a good time to develop those arguments.
--
-Dave
More information about the swift-users
mailing list