Opened 11 years ago
Last modified 11 years ago
#2011 new defect
Handle schema and template errors more gracefully
Reported by: | historic_bruno | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description (last modified by )
Currently, when someone makes a simple mistake in the component schema, the game fails spectacularly; RelaxNGValidator::LoadGrammar()
fails in CCmpTemplateManager
, but we don't do any proper error handling, so every template fails to load. Finally some part of the simulation crashes with an assertion failure because no entities have been initialized, which is awful. That makes finding the cause of the errors more difficult and is not very friendly.
Instead the schema failing to load should cause the game to end and return to the main menu with a reasonable error message, the simulation can't be expected to continue at that point.
A similar problem (see #1836) occurs with errors in special entities like special/player.xml
, even when the schema is valid, a small error in the template leads to every template failing to load and a crash.