I noticed that the System class constructor may throw an exception, namely here:
Code: Select all
// handle initialisation and setup of the XML parser
setupXMLParser();
// now XML is available, read the configuration file (if any)
Config_xmlHandler config;
if (!configFile.empty())
{
CEGUI_TRY
{
d_xmlParser->parseXMLFile(config, configFile,
config.CEGUIConfigSchemaName,
"");
}
CEGUI_CATCH(...)
{
// cleanup XML stuff
d_xmlParser->cleanup();
delete d_xmlParser;
CEGUI_RETHROW;
}
}
I tried to catch this exception and bootstrap system with no xml file, but it fails with assertion and exceptions, probably because other singletons have been created and have not been destroyed before rethrowing the exception.
I would like to have your opinion about this.
Thanks in advance,
kintaroe