aspnet/DependencyInjection

Improve the circular dependency exception message

AndriySvyryd opened this issue · 3 comments

Currently it says A circular dependency was detected for the service of type 'MyType'.

It should provide all types in the cycle.

Eilon commented

You mean like this?

A circular dependency was detected for the service of type that has a circular dependency was detected for the service of type that has a circular dependency was detected for the service of type that has a circular dependency was detected for the service of type that has a circular dependency was detected for the service of type that has a circular dependency was detected for the service of type that has a circular dependency was detected for the service of type that has a circular dependency was detected for the service of type that has a circular dependency was detected for the service of type that has a circular dependency.?

@Eilon Sounds perfect, as I always say - redundancy leads to clarity.

Eilon commented

@pakrym I'm assigning to you to resolve when #592 is merged.