Uploaded image for project: 'Commons Logging'
  1. Commons Logging
  2. LOGGING-14

[logging] LogConfigurationException double wrapped

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.4
    • 1.1.0
    • None
    • Operating System: Windows 2000
      Platform: PC

    • 35112

    Description

      LogFactoryImpl.getLogConstructor() double-wraps when it throws
      LogConfigurationException. In other words, when it throws
      LogConfigurationException, it wraps that exception in another
      LogConfigurationException. In fact, the full message is:

      org.apache.commons.logging.LogConfigurationException:
      org.apache.commons.logging.LogConfigurationException:
      java.lang.NullPointerException (Caused by java.lang.NullPointerException)
      (Caused by org.apache.commons.logging.LogConfigurationException:
      java.lang.NullPointerException (Caused by java.lang.NullPointerException))

      Feel free to track that mess down, but this report is just for this one instance
      of wrapping.

      The wrapping occurs on line 397. You can fix it either by ensuring the "throw
      new" calls are outside the "catch Throwable", or you can add an extra catch:

      catch (LogConfigurationException ex)

      { throw ex; }

      catch (Throwable t)

      { throw new LogConfigurationException(t); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            w-zwicky@cecer.army.mil Bill Zwicky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: