[platform] fault-tolerant bindings initialization

This commit is contained in:
Roman Shevchenko
2017-08-29 19:14:37 +03:00
parent 11ba5dbd40
commit f59cc8246c
2 changed files with 10 additions and 2 deletions
@@ -167,7 +167,11 @@ private val serializer = object : XmlSerializerImpl.XmlSerializerBase() {
try {
binding.init(originalType, this)
}
catch (e: XmlSerializationException) {
catch (e: RuntimeException) {
map.remove(key)
throw e
}
catch (e: Error) {
map.remove(key)
throw e
}
@@ -132,7 +132,11 @@ public final class XmlSerializerImpl {
try {
binding.init(originalType, this);
}
catch (XmlSerializationException e) {
catch (RuntimeException e) {
map.remove(key);
throw e;
}
catch (Error e) {
map.remove(key);
throw e;
}