>>106847398
We need explicit error propagation, consider this:
Try {
Linear SocketHandle client
client := Propagate net.Accept()
Propagate HandleClient(client)
}
Catch e: ErrorCode {
WriteLN('Client handling failed: ', e)
}
This:
Try {
Linear SocketHandle client
Propagate {
client := net.Accept()
HandleClient(client)
}
}
Catch e: ErrorCode {
WriteLN('Client handling failed: ', e)
}
And this:
Try Propagate {
Linear SocketHandle client
client := net.Accept()
HandleClient(client)
}
Catch e: ErrorCode {
WriteLN('Client handling failed: ', e)
}
All this should work with sum types, no stack unrolling or setjump-longjump required.