Handle some IllegalArgument cases in readBytes#175
Conversation
The 2nd error covered here potentially could explain cases like java-native#122 or related. Example: Passed-in 'byteCount' is either far too large or even a negative value which could trigger undesired behavior when used to allocate an array.
|
Where can I find an anyhow useful error message about why so many automated builds are failing? No matter where I click, It only literally says: "Error:". I have no idea what I should fix. |
I think GitHub actions' log area uses JavaScript to expand the relevant section and navigate to the error. Depending on your browser, if this isn't firing it might be hiding everything. Anyhow.... Here's what my browser shows: Click to expand |
Thx. It really was that simple :) Didn't notice that actions require yet another domain to run JavaScript from. |
f5f701c to
4c387d9
Compare
This change is because usage of std::bad_alloc caused trouble on macos. See: java-native#175 (comment)
Tried to use MissingResourceException. But having a look at its extra ctor args, it seems not to be made for our use-case. Falling back to `RuntimeException` instead. Also enhanced test debug logging a bit.
|
No objections here... @pietrygamat did you have any unresolved comments to sort before merging? |
|
@tresf I'm good. |
The 2nd error covered here potentially could explain cases like #122 or related. Example: Passed-in 'byteCount' is either far too large or even a negative value which could trigger undesired behavior when used to allocate an array.