Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="4.0.0-preview-675" />

 ResolutionFailedException

Represents the exception the container throws when a service resolution is failed.
using System; using System.Runtime.Serialization; namespace Stashbox.Exceptions { [Serializable] public class ResolutionFailedException : Exception { public Type Type { get; } public ResolutionFailedException(Type type, object name = null, string message = "Service is not registered properly or unresolvable type requested.", Exception innerException = null) : base("Unable to resolve type " + type.FullName + ((name != null) ? (" with the name '" + name?.ToString() + "'") : "") + "." + Environment.NewLine + message, innerException) { Type = type; } protected ResolutionFailedException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }