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

TransferElement::isReadable()/isWriteable() and exceptions #165

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

TransferElement::isReadable()/isWriteable() and exceptions #165

mhier opened this issue Jul 24, 2020 · 0 comments

Comments

@mhier
Copy link
Member

mhier commented Jul 24, 2020

The spec is a bit vague about TransferElement::isReadable()/isWriteable() throwing exceptions. C.5.3.4 says merely "If the test function needs to obtain the information from the device, a runtime_error might occur.". This needs to be extended so calling isReadable()/isWriteable() throws both logic_error and runtime_error under similar conditions as read or write operations:

  • If the device is closed, a logic_error must be thrown
  • If setException() has been called before, a runtime_error must be thrown
  • In addition, what C.5.3.4 currently says, if isReadable()/isWriteable() need to communicate because no cached information or information from a map file is available, a runtime_error might occur if the device is broken.

This requires changes in the spec, in the implementations and in the UnifiedBackendTest.

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