print error irritants
This commit is contained in:
parent
535cd0c21e
commit
a0323bd5fc
|
@ -42,6 +42,7 @@ pic_print_backtrace(pic_state *pic, xFILE *file)
|
||||||
pic_fwrite(pic, pic->err, file);
|
pic_fwrite(pic, pic->err, file);
|
||||||
} else {
|
} else {
|
||||||
struct pic_error *e;
|
struct pic_error *e;
|
||||||
|
pic_value elem, it;
|
||||||
|
|
||||||
e = pic_error_ptr(pic->err);
|
e = pic_error_ptr(pic->err);
|
||||||
if (e->type != pic_intern_cstr(pic, "")) {
|
if (e->type != pic_intern_cstr(pic, "")) {
|
||||||
|
@ -50,9 +51,12 @@ pic_print_backtrace(pic_state *pic, xFILE *file)
|
||||||
}
|
}
|
||||||
xfprintf(pic, file, "error: ");
|
xfprintf(pic, file, "error: ");
|
||||||
pic_fwrite(pic, pic_obj_value(e->msg), file);
|
pic_fwrite(pic, pic_obj_value(e->msg), file);
|
||||||
xfprintf(pic, file, "\n");
|
|
||||||
|
|
||||||
/* TODO: print error irritants */
|
pic_for_each (elem, e->irrs, it) { /* print error irritants */
|
||||||
|
xfprintf(pic, file, " ");
|
||||||
|
pic_fwrite(pic, elem, file);
|
||||||
|
}
|
||||||
|
xfprintf(pic, file, "\n");
|
||||||
|
|
||||||
xfputs(pic, pic_str_cstr(pic, e->stack), file);
|
xfputs(pic, pic_str_cstr(pic, e->stack), file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue