-
Notifications
You must be signed in to change notification settings - Fork 38.7k
refactoring: Cleanup StartRest() #13938
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
Conversation
|
utACK 13938/commits/923b9f5172d5a8d2841fb52e187bd057570853ee |
|
If my memory doesn't fail me, we did something similar only 2 weeks ago: Return void instead of bool for functions that cannot fail #13774 How many are there still left? |
|
utACK 923b9f5172d5a8d2841fb52e187bd057570853ee |
|
Yes, I saw this one while reviewing that Pull Request. I don’t know if there are more of those. |
|
utACK 923b9f5 |
sipa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 923b9f5172d5a8d2841fb52e187bd057570853ee
src/init.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: if you're modifying this code anyway, update it to follow the style guide and put braces around then clause which isn't on the same line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
re-utACK 2da54f5 |
|
utACK 2da54f5 |
|
utACK 2da54f5 |
donaloconnor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 2da54f5
|
utACK 2da54f5 |
I think this is a good point, I'm also a bit divided on changes like this. It seems unnecessary and exposes callee implementation details to the caller. A consistent convention for error handling ("return false on error") makes sense and if a function cannot return an error that might mean that some potential errors go ignored, or do a lazy thing such as assert out. All this needs to be re-added when proper error handling is introduced in the future. |
|
Maybe we should aim to replace exceptions with returning bool (except in tests)? |
2da54f5 Cleanup StartRest() (DesWurstes) Pull request description: Tree-SHA512: 7e907315009c0351b7a3347ec13b6727abd12fe722d51cc061cb635ea20f9a550af5f50dc364c4313501b0dfc3696bcfa26a2a5f0170a4b5808624e043085d29
No description provided.