mirror of
https://github.com/aria2/aria2.git
synced 2025-01-08 11:01:38 +00:00
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:
parent
f5d5d8fa8e
commit
315c05ea3c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user