1 Reply Latest reply on Oct 1, 2007 9:28 PM by 60437

    Bug Report: Validations with invalid condition skipped


      the following thread (Development (compile) vs Run Time Error Checking ) remaindered me about a problem a had some time ago, but for which I didn't immediately write posting - shame on me! :-)

      But here we go:

      1) Create a validation
      2) Enter some validation code, eg. 1=2
      3) Set as condition type "PL/SQL Expression"
      4) Enter syntactical invalid PL/SQL code eg. abcdefg

      Run the page and submit the page.

      Nothing will happen, the changes will be applied. No error message about the invalid PL/SQL code in the condition!!!

      Run the page in debug mode, no information there too!!!

      It looks like that in the conditional type handling, all exceptions are mapped to a FALSE result of the condition, instead of raising and showing the error message of the condition execution.

      In my opinion that's a little bit dangerous behavior, because you will never be able to find such errors. Also always remember that a package call could have been valid at the time when the validation was developed and tested, but later on the package was dropped and nobody would ever notice that the validation isn't firing anymore...

      The change of the exception handler should not only be for syntactically invalid PL/SQL code, but also if a valid code is raising an exception. This should never be mapped to FALSE automatically., because something abnormal happened

      BTW, conditions for page items at least show some error text during rendering.

      Thanks for looking at it
      PS: BTW, it would be useful if the Builder would check the syntax of the PL/SQL code immediately. :-)

      My APEX Blog: http://inside-apex.blogspot.com
      The ApexLib Framework: http://apexlib.sourceforge.net
      The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/