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

Throw exception in case we fail to getBuffersBytesCount #138

Merged

Conversation

hiddenalpha
Copy link

Initially I did like to throw java.io.IOException. But as interface does not declare any exception this would require a change in the signature (aka declare that it throws an exception). Let me know if we should throw something else than what I've chosen.

Relates to: #125

NOTE 1: Initially I did like to throw java.io.IOException. But as
    interface does not declare any exception this would require a change
    in the signature (aka declare that it throws an exception).

NOTE 2: "Compiles on my machine". I could NOT meaningfully test this
    code as I've neither a setup where I could test it, nor have I
    enough time to do it.

Relates to: #125

(wip @ d4da2040382f9836b1d1a0c5fd706a8283a86e64)
@tresf
Copy link

tresf commented May 1, 2023

I think a signature change is fine, but code which doesn't immediately require a signature change is also a nice stop-gap.

@tresf
Copy link

tresf commented Nov 8, 2023

Initially I did like to throw java.io.IOException. But as interface does not declare any exception this would require a change in the signature (aka declare that it throws an exception). Let me know if we should throw something else than what I've chosen.

Relates to: #125

If you like my proposal in #146 (comment), we can maintain our signatures but also raise the exception.

@tresf
Copy link

tresf commented Nov 9, 2023

Thanks!

@tresf tresf merged commit 0d106b7 into java-native:master Nov 9, 2023
@hiddenalpha hiddenalpha deleted the issue125-ThrowExceptionIfIoctlFails branch November 10, 2023 01:00
@hiddenalpha hiddenalpha restored the issue125-ThrowExceptionIfIoctlFails branch February 16, 2024 20:54
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

Successfully merging this pull request may close these issues.

2 participants