Skip to content

Commit

Permalink
Add more error info when method not found
Browse files Browse the repository at this point in the history
a180285 authored and mkaring committed Jul 7, 2021
1 parent 0c65d32 commit 4ee7f74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Confuser.Renamer/VTable.cs
Original file line number Diff line number Diff line change
@@ -227,7 +227,10 @@ public static VTable ConstructVTable(TypeDef typeDef, VTableStorage storage) {
});
}
else {
var targetSlot = vTbl.AllSlots.Single(slot => slot.MethodDef == targetMethod);
var targetSlot = vTbl.AllSlots.SingleOrDefault(slot => slot.MethodDef == targetMethod);
if (targetSlot == null) {
throw new Exception($"method [{method}] not found.");
}
CheckKeyExist(storage, vTbl.SlotsMap, targetSlot.Signature, "MethodImpl Normal Sig");
targetSlot = vTbl.SlotsMap[targetSlot.Signature]; // Use the most derived slot
// Maybe implemented by above processes --- this process should take priority

0 comments on commit 4ee7f74

Please sign in to comment.