error handling - Should app crash or continue on normally while noting the problem? -
option:
1) When a bad input occurs, the app crashes and a message Prints the console saying what happened
2) When there is bad input, the app exits the input and continues as if nothing happened (although the problem in the different log files No problem).
> Although 2 can seem like a clear solution, the app is a game and game structure for development, so if a user is writing something and does something wrong, then it can be beneficial for that problem It is being ignored rather than being apparent immediately (app crashing), and the user is likely to forget to check the logs to see if there is a problem (forget that programming and Behavior is not very noticeable on the screen, so it is missing do not believe it).
There is no size-fit-all solution is it really depends on the situation and how much the input It's bad.
However, since you have specifically told it for an engine or structure, then I would say that it should never have an accident. It should take an exception or provide a significant return code or whatever is relevant to your environment, and then the application developer can use your framework to decide how to handle it. The framework should not make this decision for all apps themselves, which use the framework.
Comments
Post a Comment