Closed
Description
Problem
When I run following code with a unexisting config_file. I cannot catch any exception cuz doConfigure() didn't throws it.
Root Cause
And I find it's caused by the throw_flag
is not set to true here in Properties constructor.
To fix
Can we fix this problem? I think if the error here is thrown correctly that will be very helpful.
try
{
log4cplus::PropertyConfigurator::doConfigure(config_file);
}
catch (...)
{
std::cerr << "caught an error" ; std::endl;
}
- version: 2.0.5
- operating system: Ubuntu 18.04
- flags and settings used by your application: N/A
- compiler and its version: g++ 7.5.0