src: use proper errors as coming from StringBytes#14579
src: use proper errors as coming from StringBytes#14579addaleax wants to merge 1 commit intonodejs:masterfrom
Conversation
src/node_file.cc
Outdated
There was a problem hiding this comment.
return env->isolate()->ThrowException(error);? The call to rc.ToLocalChecked() two lines down will fail if you fall through.
Same issue appears a few more times further down in this file.
src/node_os.cc
Outdated
There was a problem hiding this comment.
fixed up, this was not intentional
src/node_os.cc
Outdated
There was a problem hiding this comment.
Suggestion: move the .IsEmpty() checks to after the StringBytes::Encode() calls, then you don't have to do the goto jump-around thing.
There was a problem hiding this comment.
error is cleared by StringBytes::Encode() if the call succeeded… I’ve thought about doing that, would you prefer to change that behaviour? I can see the advantage that would have.
There was a problem hiding this comment.
Good idea. I was thinking of guarding the Encode() calls with an error.IsEmpty() check but that's a good idea.
4951e75 to
84a16b0
Compare
|
@bnoordhuis Mind taking another look? |
src/node_os.cc
Outdated
The previous errors were incorrect here, as the code only failed in situations where strings exceeded size limits or an OOM situation was encountered, not for invalid encodings (which aren’t even detected explicitly). Unfortunately, these situations are hard to test for. PR-URL: nodejs#14579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
84a16b0 to
116447a
Compare
|
CI: https://ci.nodejs.org/job/node-test-commit/11985/ This should be ready. |
|
@addaleax ... fyi https://ci.nodejs.org/job/node-test-commit-aix/8108/nodes=aix61-ppc64/console Can you check to see if this failure is related to the change? |
|
Ugh … a lot of the Linux failures are the same, so, probably? |
|
Sigh. Yes, also a problem on |
|
I'm digging in also. :-) This wasn't a problem earlier today so it has to be one of the PRs landed today.... and I can't get to Jenkins... sigh. Will keep trying |
|
Heh, okay, I think I got this. |
|
Um.. that's confusing then :-/ ... the CI was good for that PR even on 32 bit system. What do you have? |
The previous errors were incorrect here, as the code only failed in situations where strings exceeded size limits or an OOM situation was encountered, not for invalid encodings (which aren’t even detected explicitly). Unfortunately, these situations are hard to test for. PR-URL: #14579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The previous errors were incorrect here, as the code only failed in situations where strings exceeded size limits or an OOM situation was encountered, not for invalid encodings (which aren’t even detected explicitly). Unfortunately, these situations are hard to test for. PR-URL: nodejs/node#14579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The previous errors were incorrect here, as the code only failed in situations where strings exceeded size limits or an OOM situation was encountered, not for invalid encodings (which aren’t even detected explicitly). Unfortunately, these situations are hard to test for. PR-URL: nodejs/node#14579 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The previous errors were incorrect here, as the code
only failed in situations where strings exceeded size limits or
an OOM situation was encountered, not for invalid encodings
(which aren’t even detected explicitly).
Unfortunately, these situations are hard to test for.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
src