give fatal error message for missing config file rather than crashing

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7037 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: fbcd08f32e51e9fec158680f91fbc226ef089dd7
Former-commit-id: 7d75020cb0a19c0bbb230f4492027d6429052dfe
This commit is contained in:
iobyte 2020-05-10 20:46:53 +00:00
parent 1231a16803
commit 5ccf150ff7

View file

@ -41,7 +41,7 @@ MyParam::MyParam(void** carparmhandle, const std::string& datadir, const std::st
if (*carparmhandle == NULL)
{
*carparmhandle = GfParmReadFile(defaultfile.c_str(), GFPARM_RMODE_STD);
assert(*carparmhandle != NULL && "default.xml file not found");
LogUSR.fatal("Couldn't load : %s", defaultfile.c_str());
}
}
else
@ -66,7 +66,7 @@ MyParam::MyParam(void** carparmhandle, const std::string& datadir, const std::st
if (*carparmhandle == NULL)
{
*carparmhandle = GfParmReadFile(defaultfile.c_str(), GFPARM_RMODE_STD);
assert(*carparmhandle != NULL && "default.xml file not found");
LogUSR.fatal("Couldn't load : %s\n", defaultfile.c_str());
}
}