junkdog / artemis-odb

A continuation of the popular Artemis ECS framework
BSD 2-Clause "Simplified" License
769 stars 109 forks source link

[Question] Systematic Error Handling ? #651

Open bryanbrunt opened 2 years ago

bryanbrunt commented 2 years ago

What approaches does everyone use for handling errors?

Do you simply wrap the code in each system's process functions to catch exceptions?

protected void process(int e) { try { return lang.get(resource); } catch (Exception ex) { ex.printStackTrace(); return null; } }

As a potential feature request: what if you could define some type of Error Handling System for each world?

All of the ECS examples that I'm seeing basically have no comprehensive error handling. You can't exactly ship code without a way to log and handle potential errors.