Uploaded image for project: 'REEF (Retired)'
  1. REEF (Retired)
  2. REEF-292

Improve details for InjectionException in Tang.NET

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Tang.NET
    • None

    Description

      InjectionException in Tang is thrown when it cannot instantiate a type. The current exception contains the type which couldn't be instantiated, but little more detail. This can make debugging harder than it needs to be (see REEF-276 for an example).

      We should improve Tang to throw specific exceptions for all the reasons why injection could fail. These include:

      1. The type to instantiate is unknown. We should differentiate the cases where the assembly which should contain it was loaded or not. In the cases where it was not, the exception should contain the reason, e.g. file not found or unable to read or such.
      2. The type has no injectable constructors at all. This captures the common case of missing attributes.
      3. The type has injectable constructors, but the configuration provided isn't complete enough to satisfy any of them.

      Attachments

        Issue Links

          Activity

            People

              juliaw Julia Wang
              markus.weimer Markus Weimer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: