Use same exception class in ruby and jruby

This commit is contained in:
Anders Carling 2015-11-20 21:56:04 +01:00
parent 0df1e398eb
commit 8bcd0d7fc7

View file

@ -93,7 +93,7 @@ public class RubyMessage extends RubyObject {
maps.put(fieldDescriptor, map);
} else if (fieldDescriptor.isRepeated()) {
if (!(value instanceof RubyArray))
throw runtime.newTypeError("Expected array as initializer var for repeated field.");
throw runtime.newArgumentError("Expected array as initializer var for repeated field.");
RubyRepeatedField repeatedField = rubyToRepeatedField(context, fieldDescriptor, value);
addRepeatedField(fieldDescriptor, repeatedField);
} else {