Add additional logging of fromClass for convertReloadToDeleteInsert assertion

Summary:
It's hard to figure out what the problem is, if you don't know which viewModel causes the trouble at all.
Let's add the class name to the assertion message.

Differential Revision: D6419460

fbshipit-source-id: 58edebca7839871b6d48e463caad957d7920e129
This commit is contained in:
Markus Emrich 2017-11-27 15:58:54 -08:00 committed by Facebook Github Bot
parent 2d5eed2477
commit 85b1a42ec6

View file

@ -263,8 +263,8 @@ void convertReloadToDeleteInsert(NSMutableIndexSet *reloads,
[inserts addIndex:to];
} else {
IGAssert([result.deletes containsIndex:idx],
@"Reloaded section %zi was not found in deletes with from: %zi, to: %zi, deletes: %@",
idx, from, to, deletes);
@"Reloaded section %zi was not found in deletes with from: %zi, to: %zi, deletes: %@, fromClass: %@",
idx, from, to, deletes, [(id)fromObjects[idx] class]);
}
}];
}