First of all thanks for such a great library. I am happy to work with it. Feels like it is the library I was missing for years.
As far as I understand you don’t have support of throwing exceptions on one end and receiving them on other end? Right?
That is the common/suggested way to handle errors/exceptions on logic level.
I am not talking about erros/exceptions of NetworkComms, but rather user code.
Let’s say I send message CountApples and expect number of apples to be returned, but on other end things got wrong and number of apples can’t be returned. What is the best way to handle such situation?
Very glad you are enjoying the library. In this situation I would recommend catching all exceptions on the server side and then returning some object you manage yourself to the client.
We have not implemented a specific core feature for this as everyone may want to do it differently, as such we have left it to the developer to choose their own solution.
Having said that exception handling has been added as a feature to our Remote Procedure Call extension. We don’t have an online tutorial for this but it is extensively documented in the examples included in the download bundle.