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

18 lines
604 B
C#

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