Do not throw exception on not-found serialized class from knm

This commit is contained in:
Simon Ogorodnik
2018-09-12 20:53:09 +03:00
parent ca742b1552
commit 0cc3625dc1
@@ -23,8 +23,9 @@ class KonanClassDataFinder(
val nameList = proto.classNameList
val index = nameList.indexOfFirst { nameResolver.getClassId(it) == classId }
if (index == -1)
error("Could not find serialized class $classId")
if (index == -1) {
return null
}
val foundClass = proto.getClasses(index) ?: error("Could not find data for serialized class $classId")