Skip to content

Throw exception in case we fail to getBuffersBytesCount - #138

Merged
tresf merged 3 commits into
java-native:masterfrom
hiddenalpha:issue125-ThrowExceptionIfIoctlFails
Nov 9, 2023
Merged

tresf merged 3 commits into
java-native:masterfrom
hiddenalpha:issue125-ThrowExceptionIfIoctlFails

Conversation

@hiddenalpha

Copy link
Copy Markdown

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

tresf commented May 1, 2023

Copy link
Copy Markdown

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

@tresf

tresf commented Nov 8, 2023

Copy link
Copy Markdown

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.

Comment thread src/main/cpp/_nix_based/jssc.cpp Outdated
@tresf

tresf commented Nov 9, 2023

Copy link
Copy Markdown

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
@hiddenalpha
hiddenalpha deleted the issue125-ThrowExceptionIfIoctlFails branch July 27, 2025 08:58
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