mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* transcode.c (make_econv_exception): error message simplified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bb239558b8
commit
f3c43ae0c2
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun Aug 31 14:12:06 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* transcode.c (make_econv_exception): error message simplified.
|
||||
|
||||
Sun Aug 31 13:47:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/coverage/coverage.c (rb_mCoverage): removed unneeded static variable.
|
||||
|
|
|
@ -1648,20 +1648,20 @@ make_econv_exception(rb_econv_t *ec)
|
|||
VALUE bytes2 = Qnil;
|
||||
VALUE dumped2;
|
||||
if (ec->last_error.result == econv_incomplete_input) {
|
||||
mesg = rb_sprintf("incomplete input: %s on %s",
|
||||
mesg = rb_sprintf("incomplete %s on %s",
|
||||
StringValueCStr(dumped),
|
||||
ec->last_error.source_encoding);
|
||||
}
|
||||
else if (readagain_len) {
|
||||
bytes2 = rb_str_new(err+error_len, readagain_len);
|
||||
dumped2 = rb_str_dump(bytes2);
|
||||
mesg = rb_sprintf("invalid byte sequence: %s followed by %s on %s",
|
||||
mesg = rb_sprintf("%s followed by %s on %s",
|
||||
StringValueCStr(dumped),
|
||||
StringValueCStr(dumped2),
|
||||
ec->last_error.source_encoding);
|
||||
}
|
||||
else {
|
||||
mesg = rb_sprintf("invalid byte sequence: %s on %s",
|
||||
mesg = rb_sprintf("%s on %s",
|
||||
StringValueCStr(dumped),
|
||||
ec->last_error.source_encoding);
|
||||
}
|
||||
|
@ -1680,7 +1680,7 @@ make_econv_exception(rb_econv_t *ec)
|
|||
VALUE dumped;
|
||||
int idx;
|
||||
dumped = rb_str_dump(bytes);
|
||||
mesg = rb_sprintf("conversion undefined: %s from %s to %s",
|
||||
mesg = rb_sprintf("%s from %s to %s",
|
||||
StringValueCStr(dumped),
|
||||
ec->last_error.source_encoding,
|
||||
ec->last_error.destination_encoding);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue