[swift-evolution] Preconditions aborting process in server scenarios [was: Throws? and throws!]
Jean-Daniel
mailing at xenonium.com
Fri Jan 20 17:35:15 CST 2017
> Le 20 janv. 2017 à 22:55, Howard Lovatt via swift-evolution <swift-evolution at swift.org> a écrit :
>
> 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
How does TheadFatalError is supposed to behave in a world dominated by queue ?
More information about the swift-evolution
mailing list