don't reformat error message because it removes trace info
This commit is contained in:
parent
ad6833ac79
commit
535cd0c21e
|
@ -214,13 +214,7 @@ expand_defmacro(pic_state *pic, pic_value expr, struct pic_env *env)
|
|||
uid = pic_add_variable(pic, env, var);
|
||||
}
|
||||
|
||||
val = pic_cadr(pic, pic_cdr(pic, expr));
|
||||
|
||||
pic_try {
|
||||
val = pic_eval(pic, val, env);
|
||||
} pic_catch {
|
||||
pic_errorf(pic, "expand error while definition: %s", pic_errmsg(pic));
|
||||
}
|
||||
val = pic_eval(pic, pic_list_ref(pic, expr, 2), env);
|
||||
|
||||
if (! pic_proc_p(val)) {
|
||||
pic_errorf(pic, "macro definition \"~s\" evaluates to non-procedure object", var);
|
||||
|
@ -234,27 +228,7 @@ expand_defmacro(pic_state *pic, pic_value expr, struct pic_env *env)
|
|||
static pic_value
|
||||
expand_macro(pic_state *pic, struct pic_proc *mac, pic_value expr, struct pic_env *env)
|
||||
{
|
||||
pic_value v;
|
||||
|
||||
#if DEBUG
|
||||
puts("before expand-1:");
|
||||
pic_debug(pic, expr);
|
||||
puts("");
|
||||
#endif
|
||||
|
||||
pic_try {
|
||||
v = pic_apply2(pic, mac, expr, pic_obj_value(env));
|
||||
} pic_catch {
|
||||
pic_errorf(pic, "expand error while application: %s", pic_errmsg(pic));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
puts("after expand-1:");
|
||||
pic_debug(pic, v);
|
||||
puts("");
|
||||
#endif
|
||||
|
||||
return v;
|
||||
return pic_apply2(pic, mac, expr, pic_obj_value(env));
|
||||
}
|
||||
|
||||
static pic_value
|
||||
|
|
|
@ -8,18 +8,12 @@ void
|
|||
pic_load_port(pic_state *pic, struct pic_port *port)
|
||||
{
|
||||
pic_value form;
|
||||
size_t ai = pic_gc_arena_preserve(pic);
|
||||
|
||||
pic_try {
|
||||
size_t ai = pic_gc_arena_preserve(pic);
|
||||
while (! pic_eof_p(form = pic_read(pic, port))) {
|
||||
pic_eval(pic, form, pic->lib->env);
|
||||
|
||||
while (! pic_eof_p(form = pic_read(pic, port))) {
|
||||
pic_eval(pic, form, pic->lib->env);
|
||||
|
||||
pic_gc_arena_restore(pic, ai);
|
||||
}
|
||||
}
|
||||
pic_catch {
|
||||
pic_errorf(pic, "load error: %s", pic_errmsg(pic));
|
||||
pic_gc_arena_restore(pic, ai);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue