In Java there is a hierarchy of errors, the idea is that you catch at different
severities. It isn't particularly well implemented in Java with a weird
hierarchy and errors strangely classified and poor naming. Despite these
glaring shortcoming it does actually work!
In Swift this general concept of user defined error type which have a severity
level could be implemented, it might be:
protocol ProgramFatalError {} // Not possible to catch - terminates program
protocol ThreadFatalError {} // Not possible to catch - terminates thread,
but calls thread's deinit - deinit has access to the error
protocol Error {} // As is
-- Howard.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution