Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4255

MVVM constraints output Expectable exceptions to log

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.6.1
    • Fix Version/s: 8.6.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.6.2 S1, ZK 8.6.2 S2

      Description

      Steps to Reproduce

      Run fiddle in local environment
      http://zkfiddle.org/sample/16b7anl/1-paramCall-output-exception-to-console
      (note: fiddle == smallest reproducing code. Same issue triggered by more complicated constraint checks)

      Current Result

      paramCall.call() outputs caught Expectable exceptions to console.

      Expected Result

      Expectables shouldn't be output to console, such as with the regular UiEngine (see org.zkoss.zk.ui.impl.UiEngineImpl.handleError(Throwable, UiVisualizer, List<Throwable>) for usual handling)

      Debug Info

      org.zkoss.bind.impl.ParamCall.call(Object, Method) is catching InvocationTargetException which is an expectable, and logging it to Logger.error()
      Should be at most logger.debug()
      However, the catch block for the general exception type (java.lang.Exception) should still log to Logger as logger.error(), as they are not expected

      Root Cause

      Innacurate logger level used

      Workaround

      Disable log for package / class
      Ex: in log4j:

      log4j.logger.org.zkoss.bind.impl = OFF
      

        Attachments

          Activity

            People

            • Assignee:
              Leon03 Leon03
              Reporter:
              MDuchemin MDuchemin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 2 hours Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - 2 hours Remaining Estimate - 2 hours
                2h