8000 Not throws exception in PropertyConfigurator::doConfigure() when config file is not found · Issue #553 · log4cplus/log4cplus · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Not throws exception in PropertyConfigurator::doConfigure() when config file is not found #553
Closed
@Crisliu7

Description

@Crisliu7

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0