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

should not wrap an error thrown from a command method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 10.1.0
    • 10.0.0
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. click each button, compare the final error message

      Current Result

      • event listener: app dev gets the original error, NullPointerException
      • command method: app dev gets a wrapped java.lang.RuntimeException: doExecute comp=[<Button fJLW1>],command=[error],notifys=[[]]

      Expected Result

      For ZK-2638, zk should not wrap an error since it's usually an application-specific error.

      if zk wraps the error, the drawbacks are:

      • difficult to debug.
        because app devs always see a similar RuntimeException when executing a command, it could be an error from the service or persistence layer.
      • hard to handle the error according to its type
        because all errors are RuntimeException

      Debug Information

      • ZK 9.6 doesn't have this bug
      • caused by ZK-5048

      Workaround

      BinderImpl.java

        1. BinderImpl.java
          104 kB
        2. ErrorVM.java
          0.2 kB
        3. zk-5680.zul
          0.2 kB

            Unassigned Unassigned
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: