summaryrefslogtreecommitdiffhomepage
path: root/src/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/error.c b/src/error.c
index 5efa438ff..93e90fc69 100644
--- a/src/error.c
+++ b/src/error.c
@@ -166,13 +166,10 @@ exc_inspect(mrb_state *mrb, mrb_value exc)
else {
const char *cname = mrb_obj_classname(mrb, exc);
str = mrb_str_new_cstr(mrb, cname);
- mrb_str_cat_lit(mrb, str, ": ");
if (append_mesg) {
+ mrb_str_cat_lit(mrb, str, ": ");
mrb_str_cat_str(mrb, str, mesg);
}
- else {
- mrb_str_cat_cstr(mrb, str, cname);
- }
}
return str;
}