fix: potential rces, reimplement java style exceptions, implement sane checking in netcode (#794)#886
fix: potential rces, reimplement java style exceptions, implement sane checking in netcode (#794)#886izzint wants to merge 16 commits intosmartcmd:mainfrom
Conversation
|
keep in note some of the parts where there used to be c style casts have been converted to more modern c++ |
|
in its current state this shouldn't be merged, error checking is currently a little harsh and throws on launch (probably a root of a deeper problem because the throws only trigger when something weird happens in the respective function its in) |
|
There is absolutely no need to introduce new exceptions — they bloat the unwinding and make the code more complicated. |
|
if you have any ideas on implementing a system to gracefully clients who invalidate the checks id gladly appreciate it! probably not the best idea to tie it into exceptions but it wouldn't be hard to move away from them at all. |
no yeah this is way simpler than i made it out to be, 4j codebase design proves to never work in anyones favour, period |
|
will get back to this tommorow |
|
If so, try finding a solution that doesn't involve exceptions, if possible. |
fixes #794
This PR is not fully finished, going through netcode takes a lot of effort and there's more and more new stuff i keep finding, expect a full write-up here once this PR gets to a more complete and all-encompassing state.
Currently implements
IOException,EOFException,RuntimeException, andIllegalArgumentException.trying my best to fill in the voids left by 4j where these are supposed to fit, as well as finding new places to insert them.
For more details on the current state of this, please check the commit history.
Please keep in note that contributions from other people are extremely welcomed! ;]