You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Interface class is useful in two very different contexts: as a member of a service which needs to communicate with other services, or as a local variable in an interpreter or script. In the former case, certain error conditions should a ThrowReply, so that we can send the client an error reply with reasonable return code, but the the later case, this will result in new exceptions because there is no request to reply to.
The suggested solution is to implement a custom exception with the same interface/signature as ThrowReply, but which is just a local exception. When the interface is initialized, it should include a kwarg for indicating the execution context (default for local use) which assigns a local reference to either ThrowReply or this new exception, that reference should be used throughout.
The text was updated successfully, but these errors were encountered:
The
Interface
class is useful in two very different contexts: as a member of a service which needs to communicate with other services, or as a local variable in an interpreter or script. In the former case, certain error conditions should a ThrowReply, so that we can send the client an error reply with reasonable return code, but the the later case, this will result in new exceptions because there is no request to reply to.The suggested solution is to implement a custom exception with the same interface/signature as ThrowReply, but which is just a local exception. When the interface is initialized, it should include a kwarg for indicating the execution context (default for local use) which assigns a local reference to either
ThrowReply
or this new exception, that reference should be used throughout.The text was updated successfully, but these errors were encountered: