remove pic_error
This commit is contained in:
parent
368fa17de3
commit
229555fa83
|
@ -10,7 +10,7 @@
|
|||
PIC_NORETURN static void
|
||||
file_error(pic_state *pic, const char *msg)
|
||||
{
|
||||
pic_error(pic, "file", msg, pic_nil_value(pic));
|
||||
pic_raise(pic, pic_make_error(pic, "file", msg, pic_nil_value(pic)));
|
||||
}
|
||||
|
||||
static pic_value
|
||||
|
|
|
@ -49,7 +49,7 @@ pic_errorf(pic_state *pic, const char *fmt, ...)
|
|||
|
||||
msg = pic_str(pic, err);
|
||||
|
||||
pic_error(pic, "", msg, pic_nil_value(pic));
|
||||
pic_raise(pic, pic_make_error(pic, "", msg, pic_nil_value(pic)));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -154,12 +154,6 @@ pic_raise(pic_state *pic, pic_value err)
|
|||
pic_errorf(pic, "error handler returned with ~s on error ~s", val, err);
|
||||
}
|
||||
|
||||
void
|
||||
pic_error(pic_state *pic, const char *type, const char *msg, pic_value irrs)
|
||||
{
|
||||
pic_raise(pic, pic_make_error(pic, type, msg, irrs));
|
||||
}
|
||||
|
||||
static pic_value
|
||||
pic_error_with_exception_handler(pic_state *pic)
|
||||
{
|
||||
|
@ -205,7 +199,7 @@ pic_error_error(pic_state *pic)
|
|||
|
||||
pic_get_args(pic, "z*", &str, &argc, &argv);
|
||||
|
||||
pic_error(pic, "", str, pic_make_list(pic, argc, argv));
|
||||
pic_raise(pic, pic_make_error(pic, "", str, pic_make_list(pic, argc, argv)));
|
||||
}
|
||||
|
||||
static pic_value
|
||||
|
|
|
@ -102,6 +102,7 @@ pic_panicf pic_atpanic(pic_state *, pic_panicf f);
|
|||
PIC_NORETURN void pic_panic(pic_state *, const char *msg);
|
||||
PIC_NORETURN void pic_errorf(pic_state *, const char *fmt, ...);
|
||||
PIC_NORETURN void pic_raise(pic_state *, pic_value v);
|
||||
pic_value pic_make_error(pic_state *, const char *type, const char *msg, pic_value irrs);
|
||||
|
||||
pic_value pic_lambda(pic_state *, pic_func_t f, int n, ...);
|
||||
pic_value pic_vlambda(pic_state *, pic_func_t f, int n, va_list);
|
||||
|
|
|
@ -109,7 +109,6 @@ pic_value pic_err(pic_state *);
|
|||
|
||||
/* for debug */
|
||||
|
||||
PIC_NORETURN void pic_error(pic_state *, const char *type, const char *msg, pic_value irrs);
|
||||
void pic_warnf(pic_state *, const char *, ...);
|
||||
pic_value pic_get_backtrace(pic_state *);
|
||||
void pic_print_backtrace(pic_state *, xFILE *);
|
||||
|
|
|
@ -175,7 +175,6 @@ pic_value pic_make_identifier(pic_state *, pic_value id, pic_value env);
|
|||
pic_value pic_make_proc(pic_state *, pic_func_t, int, pic_value *);
|
||||
pic_value pic_make_proc_irep(pic_state *, struct irep *, struct context *);
|
||||
pic_value pic_make_env(pic_state *, pic_value env);
|
||||
pic_value pic_make_error(pic_state *, const char *type, const char *msg, pic_value irrs);
|
||||
pic_value pic_make_rec(pic_state *, pic_value type, pic_value datum);
|
||||
|
||||
pic_value pic_add_identifier(pic_state *, pic_value id, pic_value env);
|
||||
|
|
|
@ -31,7 +31,7 @@ static pic_value read_nullable(pic_state *pic, xFILE *file, int c, struct reader
|
|||
PIC_NORETURN static void
|
||||
read_error(pic_state *pic, const char *msg, pic_value irritants)
|
||||
{
|
||||
pic_error(pic, "read", msg, irritants);
|
||||
pic_raise(pic, pic_make_error(pic, "read", msg, irritants));
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in New Issue