#Idiomatic way of passing error to consumer in a RPC-like client

7 messages · Page 1 of 1 (latest)

mellow loom
#

It should be returned from read as the last argument in a multivalue return if needed

#

This is the idiom and convention.

#

We treat errors as values to avoid the unscalable abomination that is try-catch.

#

This does mean the caller has to handle errors on the way back up.

#

This is also normal

#

But it takes getting used to.

#

After coding in Java/C++ for years, I can't imagine going back.