Weiterleitung eines Fehlers in Swift

Gibt es eine bessere Lösung, um einen Swift-Fehler von einer Funktion an eine andere weiterzuleiten?

Im Moment mache ich das so:

enum Error:ErrorType{

    case Error1
    case Error2
}

func func1()throws{
     do{
         try func2()

        }catch Error.Error1{
            throw Error.Error1

        }catch Error.Error2{
            throw Error.Error2
        }
}

func func2()throws{
     // proof something
     throw Error.Error1
}

Um einen Fehler weiterzuleiten, muss ich alle Fehler abfangen und erneut werfen.

Gibt es eine bessere Lösung?

Antworten auf die Frage(4)

Ihre Antwort auf die Frage