You should be able to label a 1-tuple return value as a way to document the return value.

For example:

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

print(f(5).errorValue)