If I understand you correctly you want to sugar over this:
let value: Value
do {
value = try getValue()
} catch {
print(error)
return // in your case this would be required
}
// use value here
Is that correct?
I pitched something like this myself before and IIRC this is also known by the community as guard catch
.