Skip to content

Commit cc8a09d

Browse files
committed
fix ReferenceError: function paramter name and variable name when throwing error are not the same
1 parent 0029dfa commit cc8a09d

File tree

1 file changed

+4
-4
lines changed
  • scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Schema/XSD

1 file changed

+4
-4
lines changed

scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Schema/XSD/Calendar.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Jsonix.Schema.XSD.Calendar = Jsonix.Class(Jsonix.Schema.XSD.AnySimpleType, {
102102
};
103103
return new Jsonix.XML.Calendar(data);
104104
}
105-
throw new Error('Value [' + value + '] does not match the xs:date pattern.');
105+
throw new Error('Value [' + text + '] does not match the xs:date pattern.');
106106
},
107107
parseDate : function(text, context, input, scope) {
108108
Jsonix.Util.Ensure.ensureString(text);
@@ -117,7 +117,7 @@ Jsonix.Schema.XSD.Calendar = Jsonix.Class(Jsonix.Schema.XSD.AnySimpleType, {
117117
};
118118
return new Jsonix.XML.Calendar(data);
119119
}
120-
throw new Error('Value [' + value + '] does not match the xs:date pattern.');
120+
throw new Error('Value [' + text + '] does not match the xs:date pattern.');
121121
},
122122
parseTime : function(text, context, input, scope) {
123123
Jsonix.Util.Ensure.ensureString(text);
@@ -133,7 +133,7 @@ Jsonix.Schema.XSD.Calendar = Jsonix.Class(Jsonix.Schema.XSD.AnySimpleType, {
133133
};
134134
return new Jsonix.XML.Calendar(data);
135135
}
136-
throw new Error('Value [' + value + '] does not match the xs:time pattern.');
136+
throw new Error('Value [' + text + '] does not match the xs:time pattern.');
137137
},
138138
parseTimezoneString : function(text) {
139139
// (('+' | '-') hh ':' mm) | 'Z'
@@ -156,7 +156,7 @@ Jsonix.Schema.XSD.Calendar = Jsonix.Class(Jsonix.Schema.XSD.AnySimpleType, {
156156
var minute = parseInt(results[5], 10);
157157
return sign * (hour * 60 + minute);
158158
}
159-
throw new Error('Value [' + value + '] does not match the timezone pattern.');
159+
throw new Error('Value [' + text + '] does not match the timezone pattern.');
160160
}
161161
},
162162
print : function(value, context, output, scope) {

0 commit comments

Comments
 (0)