diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-25 12:36:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-25 12:36:24 +0000 |
commit | 37d6a4dd9941afdbb11c7a8e24cd935b8852a7e6 (patch) | |
tree | d893c685c54ccdabff07c7d84913ebed795d3bcb /eval.c | |
parent | 7feb182a08fb3f2a3a9e693f20947818de9a38cc (diff) |
eval_error.c: remove warn_printf
* eval_error.c (warn_printf): remove.
* eval_error.c (error_pos_str): return error position string,
split from error_pos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -534,17 +534,18 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg, VALUE cause) e = rb_obj_as_string(mesg); th->errinfo = mesg; if (file && line) { - warn_printf("Exception `%"PRIsVALUE"' at %s:%d - %"PRIsVALUE"\n", - rb_obj_class(mesg), file, line, e); + e = rb_sprintf("Exception `%"PRIsVALUE"' at %s:%d - %"PRIsVALUE"\n", + rb_obj_class(mesg), file, line, e); } else if (file) { - warn_printf("Exception `%"PRIsVALUE"' at %s - %"PRIsVALUE"\n", - rb_obj_class(mesg), file, e); + e = rb_sprintf("Exception `%"PRIsVALUE"' at %s - %"PRIsVALUE"\n", + rb_obj_class(mesg), file, e); } else { - warn_printf("Exception `%"PRIsVALUE"' - %"PRIsVALUE"\n", - rb_obj_class(mesg), e); + e = rb_sprintf("Exception `%"PRIsVALUE"' - %"PRIsVALUE"\n", + rb_obj_class(mesg), e); } + warn_print_str(e); } TH_POP_TAG(); if (status == TAG_FATAL && th->errinfo == exception_error) { |