For example:

func f(n:Int) -> (errorValue:Int) {
    ...
}

print(f(5).errorValue)