Commit 8bcd0d7f authored by Anders Carling's avatar Anders Carling

Use same exception class in ruby and jruby

parent 0df1e398
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment