Browse files

better exception for ser_get_string

  • Loading branch information...
1 parent ee65e94 commit ece66402d03bcdabde915519e366678869dfd89b @qqshfox committed Mar 20, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 ext/rocketamf_ext/serializer.c
View
2 ext/rocketamf_ext/serializer.c
@@ -109,7 +109,7 @@ void ser_get_string(VALUE obj, VALUE encode, char** str, long* len) {
} else if(obj == Qnil) {
*len = 0;
} else {
- rb_raise(rb_eArgError, "Invalid type in ser_get_string: %d", type);
+ rb_raise(rb_eTypeError, "Invalid type in ser_get_string: %s", rb_obj_classname(type));
}
}

0 comments on commit ece6640

Please sign in to comment.