Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface needs local and service exception support #124

Open
laroque opened this issue Aug 7, 2020 · 0 comments
Open

Interface needs local and service exception support #124

laroque opened this issue Aug 7, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@laroque
Copy link
Member

laroque commented Aug 7, 2020

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.

@laroque laroque added the enhancement New feature or request label Aug 7, 2020
@laroque laroque self-assigned this Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant