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

MVVM constraints output Expectable exceptions to log

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.2
    • 8.6.1
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.6.2 S1, ZK 8.6.2 S2
    • None

      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
      

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

              Created:
              Updated:
              Resolved:

                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