Uh oh!
There was an error while loading. Please reload this page.
doc: remove outdated try/catch statements and use const - #3087
Conversation
fix description about crypto.randomBytes
There was a problem hiding this comment.
I don't think that's very enlightening for people not familiar with openssl or the code base. I don't really have suggestions on how to reword it, just that it's not very helpful now (and the part about CheckEntropy() is arguably wrong in a nuanced way.)
Also, please wrap lines at 80 columns.
There was a problem hiding this comment.
Perhaps, @JungMinu, you could update the code block instead? The note is mostly correct about the current behavior. Maybe remove the try / catch block in the example?
bnoordhuis
commented
Sep 27, 2015
The commit log could be be a little more descriptive. Ideally, you shouldn't have to look at the diff to know what a commit changed. |
JungMinu
commented
Sep 27, 2015
@bnoordhuis Thanks, I will update |
JungMinu
commented
Sep 27, 2015
@brendanashworth Thanks for your comment, I would love to 😄 |
brendanashworth
commented
Sep 27, 2015
@JungMinu assuming you've setup locally with git, you can always add new changes as new commits and push them to github. It will automatically update this PR, which is easier for everyone. |
JungMinu
commented
Sep 27, 2015
@brendanashworth Yes, I will. |
remove outdated examples about crypto.randomBytes to make it clear
JungMinu
commented
Sep 27, 2015
@brendanashworth Based on your comments, I removed |
JungMinu
commented
Sep 27, 2015
@brendanashworth@bnoordhuis Please review |
bnoordhuis
commented
Sep 27, 2015
I speculate that @brendanashworth's suggestion was to remove the try/catch statement, not the call to |
fix outdated examples about crypto.randomBytes to make it clear
JungMinu
commented
Sep 27, 2015
@bnoordhuis Thanks, I've updated |
The code shows that it throws on a lack of entropy, but the note below says that it does not. Remove outdated `try/catch`statements in sync examples about crypto.randomBytes to make it clear
JungMinu
commented
Sep 27, 2015
@bnoordhuis I've updated commit log and description, Thanks 😄 |
The code shows that it throws on a lack of entropy, but the note below says that it does not. Remove outdated try/catchstatements in sync examples about crypto.randomBytes to make it clear
The code shows that it throws on a lack of entropy, but the note below says that it does not. Remove outdated `try/catch`statements in sync examples about crypto.randomBytes to make it clear
There was a problem hiding this comment.
Does this mean there should be a try/catch? randomBytes() will never throw anymore, right?
The code shows that it throws on a lack of entropy, but the note below says that it does not. Remove outdated `try/catch`statements in sync examples about crypto.randomBytes to make it clear
JungMinu
commented
Sep 27, 2015
@Fishrock123 Sorry, I made a mistake. |
JungMinu
commented
Sep 27, 2015
@Fishrock123 Thanks for your comment 😄 |
bnoordhuis
commented
Sep 28, 2015
LGTM |
brendanashworth
commented
Sep 28, 2015
Perfect, also LGTM! |
There was a problem hiding this comment.
May I suggest to use const?
thefourtheye
commented
Sep 29, 2015
LGTM with take-it or leave-it suggestion |
The code shows that it throws on a lack of entropy, but the note below says that it does not. Remove outdated try/catchstatements in sync examples about crypto.randomBytes to make it clear. In addition, use `const` instead of `var` for constant variable.
JungMinu
commented
Sep 29, 2015
@thefourtheye Thanks, I've updated |
The code shows that it throws on a lack of entropy, but the note below says that it does not.
Remove outdated
try/catchstatements in sync examples about crypto.randomBytes to make it clear