Home Forums Support Exceptions/Error handling

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2725
    Anonymous
    Inactive

    Hello,

    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?

    Regards,
    Igor.

    #2726
    Anonymous
    Inactive

    Heya Igor,

    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.

    Kind regards,
    Marc

    #2728
    Anonymous
    Inactive

    Hi Marc,

    Thanks for quick and full answer.
    Yeah, I think it is the best to leave exception/error implementation for developers.
    I’ll take a look on RPC example.

    Regards,
    Igor.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.