Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1454

Improve formatting of WELD-001408 Unsatisfied dependencies

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.1.13.Final, 2.0.1.Final
    • Fix Version/s: 2.0.4.Final, 2.1.0.Alpha1
    • Component/s: None
    • Labels:
      None

      Description

      IDE's generally support automatic links made of stacktrace elements (click brings user to the source).

      This can be leveraged when reporting an unsatisfied dependency related to a known place in code.

      For example this

      Exception in thread "main" org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [EmfProperties] with qualifiers [@QEmfProperties] at injection point [[field] @QEmfProperties @Inject private org.jboss.weld.environment.se.jpa.EntityManagerStoreImpl.emfProperties]
      	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:311)
      	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
      

      could be improved to

      WELD-001408 Unsatisfied dependencies for type 
          [EmfProperties] with qualifiers [@QEmfProperties] at injection point:
              at org.jboss.weld.environment.se.jpa.EntityManagerStoreImpl(EntityManagerStoreImpl:1)
          [field] @QEmfProperties @Inject private org.jboss.weld.environment.se.jpa.EntityManagerStoreImpl.emfProperties
      Stacktrace:
      	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:311)
      	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
      

      Still better to have a file link without a line number than nothing.
      But even the number could be obtained from class data. I assume there are not much performance requirements on Exceptions construction - what's important is to bring maximum usefulness for debugging.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  luksa Marko Luksa
                  Reporter:
                  ozizka Ondrej Zizka
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: