I think what you want would be this change in the language where every function would throw which enables you to create a single generic version of your function:
Another interesting future direction we could take to address polymorphism over throws specifically would be to adopt typed throws, and make the error type an independent type argument of all function types. This would mean that a type that doesn't throw effectively throws Never, and one that throws without a type by default throws Error:
(X, Y, Z) -> W === (X, Y, Z) throws Never -> W
(X, Y, Z) throws -> W === (X, Y, Z) throws Error -> W
This would allow protocols to be generic over thr…