Skip to content

Commit 18db044

Browse files
Exposes UnknownContractException.UnknownContract getter
1 parent e9712e3 commit 18db044

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Assets/Reflex/Exceptions/UnknownContractException.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ namespace Reflex.Exceptions
55
{
66
public sealed class UnknownContractException : Exception
77
{
8-
public UnknownContractException(Type contract) : base(GenerateMessage(contract))
8+
public Type UnknownContract { get; }
9+
10+
public UnknownContractException(Type unknownContract) : base(GenerateMessage(unknownContract))
911
{
12+
UnknownContract = unknownContract;
1013
}
1114

12-
private static string GenerateMessage(Type contract)
15+
private static string GenerateMessage(Type unknownContract)
1316
{
14-
return $"Cannot resolve contract '{contract.GetFullName()}'.";
17+
return $"Cannot resolve contract '{unknownContract.GetFullName()}'.";
1518
}
1619
}
1720
}

0 commit comments

Comments
 (0)