Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2079

ruleBase.addPackage(packageBuilder.getPackage()); should fail-fast with a clear error message if the packageBuilder has any errors

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Unresolved
    • Minor
    • 6.0.0.Alpha1
    • 5.0.0.CR1
    • drools-core
    • None

    Description

      After you 've build your package with packageBuilder,
      you've either called the hasErrors() method and done something about it
      or you didn't check the hasErrors() method because you didn't know (or want to know) it existed and you expect it to throw an exception because hasErrors() returns true.

      The principle of least surpise. You don't expect that it continues like everything is cool (while it's not) and crashes the moment you fire your first rules.

      The exception should be a runtime exception and the message should at least mention the first of the errors.
      The exception should probably contain a list of all errors of course too as a property.
      See InvalidStateException in hibernate-validator.

      Attachments

        Issue Links

          Activity

            People

              mproctor@redhat.com Mark Proctor
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

              Dates

                Created:
                Updated:
                Archived:

                PagerDuty