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);
|
uid = pic_add_variable(pic, env, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
val = pic_cadr(pic, pic_cdr(pic, expr));
|
val = pic_eval(pic, pic_list_ref(pic, expr, 2), env);
|
||||||
|
|
||||||
pic_try {
|
|
||||||
val = pic_eval(pic, val, env);
|
|
||||||
} pic_catch {
|
|
||||||
pic_errorf(pic, "expand error while definition: %s", pic_errmsg(pic));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! pic_proc_p(val)) {
|
if (! pic_proc_p(val)) {
|
||||||
pic_errorf(pic, "macro definition \"~s\" evaluates to non-procedure object", var);
|
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
|
static pic_value
|
||||||
expand_macro(pic_state *pic, struct pic_proc *mac, pic_value expr, struct pic_env *env)
|
expand_macro(pic_state *pic, struct pic_proc *mac, pic_value expr, struct pic_env *env)
|
||||||
{
|
{
|
||||||
pic_value v;
|
return pic_apply2(pic, mac, expr, pic_obj_value(env));
|
||||||
|
|
||||||
#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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static pic_value
|
static pic_value
|
||||||
|
|
|
@ -8,8 +8,6 @@ void
|
||||||
pic_load_port(pic_state *pic, struct pic_port *port)
|
pic_load_port(pic_state *pic, struct pic_port *port)
|
||||||
{
|
{
|
||||||
pic_value form;
|
pic_value form;
|
||||||
|
|
||||||
pic_try {
|
|
||||||
size_t ai = pic_gc_arena_preserve(pic);
|
size_t ai = pic_gc_arena_preserve(pic);
|
||||||
|
|
||||||
while (! pic_eof_p(form = pic_read(pic, port))) {
|
while (! pic_eof_p(form = pic_read(pic, port))) {
|
||||||
|
@ -18,10 +16,6 @@ pic_load_port(pic_state *pic, struct pic_port *port)
|
||||||
pic_gc_arena_restore(pic, ai);
|
pic_gc_arena_restore(pic, ai);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pic_catch {
|
|
||||||
pic_errorf(pic, "load error: %s", pic_errmsg(pic));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
pic_load_cstr(pic_state *pic, const char *src)
|
pic_load_cstr(pic_state *pic, const char *src)
|
||||||
|
|
Loading…
Reference in New Issue