H-uru / dirtsand

The D'ni in Real-Time Server and Network Dæmon
GNU Affero General Public License v3.0
35 stars 24 forks source link

Error handling refactor and cleanup #126

Closed zrax closed 6 years ago

zrax commented 6 years ago

Stop the abuse of assert macros! This change reserves DS_ASSERT only for fatal programming or environment errors that can't be recovered from. Many of the cases it was being (ab)used for are now reworked into more meaningful exceptions, warnings, or even descriptive fatal errors, and many cases where asserts were used (or worse ignored due to Release builds) to escape from a trivial data parsing issue are now handled more gracefully instead of just dropping a client (or in some cases, a server process).

Obviously this is a non-trivial refactor, so it should be reviewed and tested carefully, but I think it will generally improve the quality of dirtsand's error handling.

zrax commented 6 years ago

Updated to address issues with eventfd errors.

Hoikas commented 6 years ago

This appears to be working correctly on Gehn 26 beta, with the exception of the known issue #122