All errors raised by wrong data should be handled in a different way as they are not really a bug/crash/errors in the program itself.
This means, bugs in any kind of xmls, bugs about missing files and so on should NOT be handles as megaglest_runtime_errors with all sort of debug output and so on. This is just confusing and helps in no way neither the modder nor the engine developer ( you get error outputs like this: (
http://pastebin.com/raw/PfnsEgkM)
These kind of data bugs should be reported on console only and should just tell the real error and maybe some more info like:
Message: Error no animations found for skill [charge_skill] for parentLoader [/home/tscharn/.megaglest/scenarios/the_seventh_element/megarealms/factions/tech/units/long_swordsman/long_swordsman.xml]
Or something similar output which maybe gives more info about the real reason in a stacked/multi line way like this:
Message: Error loading UnitType: /home/tscharn/.megaglest/scenarios/the_seventh_element/megarealms/factions/tech/units/long_swordsman/long_swordsman.xml
Message: Error no animations found for skill [charge_skill] for parentLoader [/home/tscharn/.megaglest/scenarios/the_seventh_element/megarealms/factions/tech/units/long_swordsman/long_swordsman.xml]
After this error is written to console, just exit the game. Errors I have in mind here are xml-parsing errors, model loading errors and so on, so the things that happen on game launch.
Only direct errors from data should be reported this way, this means scenarios which suddenly crash later while playing them should of course be reported as real exceptions.