cosmetic changes

This commit is contained in:
Yuichi Nishiwaki 2016-02-23 14:15:42 +09:00
parent 4a0d077044
commit a96e5a0beb
1 changed files with 4 additions and 9 deletions

View File

@ -45,26 +45,21 @@ pic_print_error(pic_state *pic, xFILE *file)
assert(! pic_invalid_p(pic, err));
if (! pic_error_p(pic, err)) {
xfprintf(pic, file, "raise: ");
pic_fprintf(pic, port, "~s", err);
pic_fprintf(pic, port, "raise: ~s", err);
} else {
struct error *e;
pic_value elem, it;
e = pic_error_ptr(pic, err);
if (! pic_eq_p(pic, pic_obj_value(e->type), pic_intern_lit(pic, ""))) {
pic_fprintf(pic, port, "~s", pic_obj_value(e->type));
xfprintf(pic, file, " ");
pic_fprintf(pic, port, "~s-", pic_obj_value(e->type));
}
xfprintf(pic, file, "error: ");
pic_fprintf(pic, port, "~s", pic_obj_value(e->msg));
pic_fprintf(pic, port, "error: ~s", pic_obj_value(e->msg));
pic_for_each (elem, e->irrs, it) { /* print error irritants */
pic_fprintf(pic, port, " ~s", elem);
}
xfprintf(pic, file, "\n");
xfputs(pic, pic_str(pic, pic_obj_value(e->stack)), file);
pic_fprintf(pic, port, "\n%s", pic_str(pic, pic_obj_value(e->stack)));
}
}