How get the list of errors thrown by a function?
问题 With Swift now some functions are marked with throws , and this force the developers to call the function inside a do - try catch block. But how the developer can know the list of different exceptions thrown by that function? As reference, here is a line of Java code: static void employeeAge(int age) throws MyExceptionA,MyExceptionB Here is clear that the exceptions are 2 MyExceptionA and MyExceptionB and the developer can decide to act differently depends of the error. Can we achieve the