Suppress console log output for library use, enclose Platform in try-catch

Still need to suppress global::cerr and global::cout
This commit is contained in:
Tatsuhiro Tsujikawa 2013-05-02 10:25:28 +09:00
parent f5d5d8fa8e
commit 315c05ea3c

View File

@ -72,7 +72,13 @@ Platform* platform = 0;
int libraryInit()
{
platform = new Platform();
try {
platform = new Platform();
} catch(RecoverableException& e) {
A2_LOG_ERROR_EX(EX_EXCEPTION_CAUGHT, e);
return -1;
}
LogFactory::setConsoleOutput(false);
return 0;
}