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

Put exceptionHandling for isReadable() / isWriteable() into the TransferElement base class #166

Open
killenb opened this issue Jul 24, 2020 · 0 comments

Comments

@killenb
Copy link
Member

killenb commented Jul 24, 2020

For postRead() and postWrite() the call to _exceptionBackend::setException() is happening in the TransferElement base class.
isReadable() and isWriteable() also have to call setException() when they raise a ChimeraTK::runtime_error. Currently all implementations have to do this themselves.

Taks:

  • Move all existing isReadable() and isWriteable() implementations to isReadable_impl() and isWriteable_impl() in all backends
  • Introduce non-virtual functions isReadable() and isWriteable() which
    • catch runtime_errors throw by the _impl()
    • call _exceptionBackend::setException()
    • re-throw the exception
  • Make isReadOnly() a fixed, non-virtual implementation which returns isReadable() && !isWriteable(), and remove all implementations in the backends

As this is an interface change which requires to touch all backends, it should be done together with #165, which also requires that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant