You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Robert Middleton (Jira)" <lo...@logging.apache.org> on 2022/08/14 17:03:00 UTC

[jira] [Commented] (LOGCXX-524) Remove silent exceptions

    [ https://issues.apache.org/jira/browse/LOGCXX-524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17579435#comment-17579435 ] 

Robert Middleton commented on LOGCXX-524:
-----------------------------------------

it would probably make sense here to perhaps have two different APIs: one that somewhat swallows exceptions as it does now, and one that would throw them up to the user.

The advantage of swallowing the exceptions is that an exception in the logging framework should not cause your application to stop running.  If this is done however, we definitely need to make sure that any place where an exception is caught has an appropriate way to call an error handler.

Throwing them up to the user is more appropriate when attempting to load a configuration file.

> Remove silent exceptions
> ------------------------
>
>                 Key: LOGCXX-524
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-524
>             Project: Log4cxx
>          Issue Type: Improvement
>    Affects Versions: 0.11.0
>            Reporter: Robert Middleton
>            Assignee: Robert Middleton
>            Priority: Major
>             Fix For: 1.0.0
>
>
> There are a number of exceptions that log4cxx can output if something bad happens.  When this happens, all log4cxx does is to simply output a message(to stdout and/or stderr) instead of propagating that error back up to user-level code.
> See: https://stackoverflow.com/questions/34356804/log4cxx-try-catch-wont-work-on-domconfiguratorconfigure
> This may cause some unexpected behavior with already-existing code, so this needs to be effectively communicated with users and may wait until a major release.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)