From bc972d137199987933dbea29bd50dc25ec0b53c3 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Thu, 27 Nov 2014 00:46:03 +0100 Subject: [PATCH] Reqord and fix message of multiple qualifier resolve exception --- source/poodinis/dependency.d | 2 +- source/poodinis/registration.d | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/poodinis/dependency.d b/source/poodinis/dependency.d index 7c19c16..79c6be2 100644 --- a/source/poodinis/dependency.d +++ b/source/poodinis/dependency.d @@ -111,7 +111,7 @@ class DependencyContainer { if (resolveType == qualifierType) { if (candidates.length > 1) { string candidateList = candidates.toConcreteTypeListString(); - throw new ResolveException("Multiple qualified candidates available: " ~ candidateList ~ ". Please specify qualifier.", resolveType); + throw new ResolveException("Multiple qualified candidates available: " ~ candidateList ~ ". Please use a qualifier.", resolveType); } return candidates[0]; diff --git a/source/poodinis/registration.d b/source/poodinis/registration.d index 68916f1..c36848b 100644 --- a/source/poodinis/registration.d +++ b/source/poodinis/registration.d @@ -123,7 +123,7 @@ public Registration existingInstance(Registration registration, Object instance) public string toConcreteTypeListString(Registration[] registrations) { auto concreteTypeListString = ""; foreach (registration ; registrations) { - if (!concreteTypeListString.length) { + if (concreteTypeListString.length > 0) { concreteTypeListString ~= ", "; } concreteTypeListString ~= registration.instantiatableType.toString();