diff --git a/dist/Jsonix-all.js b/dist/Jsonix-all.js index 35142cf0e..308972183 100644 --- a/dist/Jsonix-all.js +++ b/dist/Jsonix-all.js @@ -2366,7 +2366,11 @@ Jsonix.Model.ClassInfo = Jsonix var propertyInfo = this.properties[index]; var propertyValue = value[propertyInfo.name]; if (Jsonix.Util.Type.exists(propertyValue)) { - propertyInfo.marshal(propertyValue, context, output, this); + try { + propertyInfo.marshal(propertyValue, context, output, this); + } catch(ex) { + throw new Error("Property [" + propertyInfo.name + "] failed to marshal: " + ex); + } } } } diff --git a/nodejs/scripts/jsonix.js b/nodejs/scripts/jsonix.js index 92682fe8d..e912f68d5 100644 --- a/nodejs/scripts/jsonix.js +++ b/nodejs/scripts/jsonix.js @@ -2379,7 +2379,11 @@ Jsonix.Model.ClassInfo = Jsonix var propertyInfo = this.properties[index]; var propertyValue = value[propertyInfo.name]; if (Jsonix.Util.Type.exists(propertyValue)) { - propertyInfo.marshal(propertyValue, context, output, this); + try { + propertyInfo.marshal(propertyValue, context, output, this); + } catch(ex) { + throw new Error("Property [" + propertyInfo.name + "] failed to marshal: " + ex); + } } } } diff --git a/scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Model/ClassInfo.js b/scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Model/ClassInfo.js index 8c7899a45..cae3f80d3 100644 --- a/scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Model/ClassInfo.js +++ b/scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Model/ClassInfo.js @@ -224,7 +224,11 @@ Jsonix.Model.ClassInfo = Jsonix var propertyInfo = this.properties[index]; var propertyValue = value[propertyInfo.name]; if (Jsonix.Util.Type.exists(propertyValue)) { - propertyInfo.marshal(propertyValue, context, output, this); + try { + propertyInfo.marshal(propertyValue, context, output, this); + } catch(ex) { + throw new Error("Property [" + propertyInfo.name + "] failed to marshal: " + ex); + } } } }