Fixed: Better message when loading a cib file and the class swapper doesn't find a class

This commit is contained in:
Martin Carlberg committed 2021-09-21 10:26:33 +02:00
1 parent a835202db1
commit 0ed2709124
1 file changed
+3 -2
+3 -2
View File
@@ -61,9 +61,10 @@ var _CPCibClassSwapperClassNameKey = @"_CPCibClassSwapperClassNameKey",
if (!object)
{
CPLog.error("Unable to find class " + theClassName + " referenced in cib file.");
var originalClassName = [aCoder decodeObjectForKey:_CPCibClassSwapperOriginalClassNameKey];
CPLog.warn(@"Unable to find class " + theClassName + @" referenced in cib file. Will try to use original class " + originalClassName + @".");
object = [self allocObjectWithCoder:aCoder className:[aCoder decodeObjectForKey:_CPCibClassSwapperOriginalClassNameKey]];
object = [self allocObjectWithCoder:aCoder className:originalClassName];
}
}