Files
Hasebe/Library/PackageCache/com.gustavopsantos.reflex@7857b9937c99/Exceptions/PropertyInjectorException.cs
T
2026-09-21 12:15:57 +03:00

18 lines
640 B
C#

using System;
using System.Reflection;
namespace Reflex.Exceptions
{
internal sealed class PropertyInjectorException : Exception
{
public PropertyInjectorException(PropertyInfo property, Exception innerException) : base(BuildMessage(property, innerException), innerException)
{
}
private static string BuildMessage(PropertyInfo property, Exception innerException)
{
var propertyDescription = $"'{property.DeclaringType.Name}.{property.Name}'";
return $"Could not inject property {propertyDescription}, inner exception: {innerException}";
}
}
}