error report is propagated through pic->err
This commit is contained in:
+3
-1
@@ -110,7 +110,7 @@ typedef struct {
|
||||
struct pic_lib *lib;
|
||||
|
||||
jmp_buf *jmp;
|
||||
const char *errmsg;
|
||||
struct pic_error *err;
|
||||
|
||||
struct pic_heap *heap;
|
||||
struct pic_object *arena[PIC_ARENA_SIZE];
|
||||
@@ -210,6 +210,8 @@ NORETURN void pic_error(pic_state *, const char *);
|
||||
NORETURN void pic_errorf(pic_state *, const char *, size_t, ...);
|
||||
void pic_warn(pic_state *, const char *);
|
||||
|
||||
const char *pic_errmsg(pic_state *);
|
||||
|
||||
void pic_debug(pic_state *, pic_value);
|
||||
void pic_fdebug(pic_state *, pic_value, XFILE *);
|
||||
|
||||
|
||||
@@ -14,9 +14,10 @@ struct pic_error {
|
||||
enum pic_error_kind {
|
||||
PIC_ERROR_OTHER,
|
||||
PIC_ERROR_FILE,
|
||||
PIC_ERROR_READ
|
||||
PIC_ERROR_READ,
|
||||
PIC_ERROR_RAISED
|
||||
} type;
|
||||
char *msg;
|
||||
struct pic_string *msg;
|
||||
pic_value irrs;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user