Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7212

Problems detected by DefinitionProviderBuilder are not mentioned in Exception

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • 5.5.4
    • configuration
    • None

      I was migrating a component definition from XML to YAML. Somehow, a Tab character got into my otherwise with spaces indented YAML file. This caused the DefinitionProviderBuilder to throw an Exception at the get method (Line 218):

      @Override
      public T get() {
          if (!valid) {
              throw new Registry.InvalidDefinitionException(metadata.getReferenceId());
          }
          return definition;
      }
      

      Although the reason why this definition is considered not valid is determined in the very same class (inside the problems property), they are not included into the exceptions message. This makes determining the actual problem very hard, since i had to insert a breakpoint into the mentioned method and look into the values inside the provlems property.

      Simply adding the problems to the exception message would do a great deal here

        Acceptance criteria

              Unassigned Unassigned
              martyglaubitz Marty Glaubitz
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:

                  Task DoD