RaspberryIO_26/Swan/DependencyInjection/DependencyContainerResolutionException.cs

32 lines
1.1 KiB
C#
Raw Normal View History

2019-12-04 18:57:18 +01:00
namespace Swan.DependencyInjection
{
using System;
/// <summary>
/// An exception for dependency resolutions.
/// </summary>
/// <seealso cref="System.Exception" />
[Serializable]
public class DependencyContainerResolutionException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="DependencyContainerResolutionException"/> class.
/// </summary>
/// <param name="type">The type.</param>
public DependencyContainerResolutionException(Type type)
: base($"Unable to resolve type: {type.FullName}")
{
}
/// <summary>
/// Initializes a new instance of the <see cref="DependencyContainerResolutionException"/> class.
/// </summary>
/// <param name="type">The type.</param>
/// <param name="innerException">The inner exception.</param>
public DependencyContainerResolutionException(Type type, Exception innerException)
: base($"Unable to resolve type: {type.FullName}", innerException)
{
}
}
}