RaspberryIO/Unosquare.Swan/Exceptions/DependencyContainerResolutionException.cs

29 lines
1.0 KiB
C#
Raw Permalink Normal View History

2019-12-03 18:44:25 +01:00
using System;
namespace Unosquare.Swan.Exceptions {
/// <summary>
/// An exception for dependency resolutions.
/// </summary>
/// <seealso cref="System.Exception" />
public class DependencyContainerResolutionException : Exception {
private const String ErrorText = "Unable to resolve type: {0}";
2019-02-17 14:08:57 +01:00
/// <summary>
2019-12-03 18:44:25 +01:00
/// Initializes a new instance of the <see cref="DependencyContainerResolutionException"/> class.
2019-02-17 14:08:57 +01:00
/// </summary>
2019-12-03 18:44:25 +01:00
/// <param name="type">The type.</param>
public DependencyContainerResolutionException(Type type)
: base(String.Format(ErrorText, 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(String.Format(ErrorText, type.FullName), innerException) {
}
}
2019-02-17 14:08:57 +01:00
}