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, string message = "Service is not registered or unresolvable type requested.", Exception innerException = null)
: base("Cannot resolve type " + type.FullName + "." + Environment.NewLine + message, innerException)
{
Type = type;
}
protected ResolutionFailedException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}