Skip to content

Commit

Permalink
Experimental commit - enhance BoDi to include the name of the Interfa…
Browse files Browse the repository at this point in the history
…ce when throwing an 'already resolved' registration exception.
  • Loading branch information
clrudolphi committed Nov 7, 2024
1 parent 41897a7 commit 7bceb80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Reqnroll/BoDi/ObjectContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public bool IsRegistered(Type type, string name = null)
private void AssertNotResolved(RegistrationKey interfaceType)
{
if (_resolvedKeys.Contains(interfaceType))
throw new ObjectContainerException("An object has been resolved for this interface already.", null);
throw new ObjectContainerException($"An object has been resolved for this interface({interfaceType.ToString()}) already.", null);
}

private void ClearRegistrations(RegistrationKey registrationKey)
Expand Down

0 comments on commit 7bceb80

Please sign in to comment.