Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2443

Consistent validation exceptions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Log4j-Audit 1.0.0
    • Log4j-Audit 1.0.1
    • Log4j-Audit
    • None

    Description

      Trying to create an ExceptionMapper for the validation exceptions I notice that there are 2 kind of exceptions that are thrown when logging.

      AbstractEventLogger mostly throws AuditException, but there's even a IllegalStateException thrown, that probably can be changed to an AuditException.

      But then there's LogEventFactory that throws ConstraintValidationException for validation errors.

      I then thought there's an exception hierarchy in place, but it seems there's no relation between AuditException and ConstraintValidationException.

      Please consider making AbstractEventLogger also throw ConstraintValidationException and maybe create some hierarchy for these exceptions to provide them a common base exception, perhaps AuditException.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shadow Andrei Ivanov
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: