initial exception handling support
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#ifndef ERROR_H__
|
||||
#define ERROR_H__
|
||||
|
||||
struct pic_error {
|
||||
PIC_OBJECT_HEADER
|
||||
enum pic_error_kind {
|
||||
PIC_ERROR_OTHER,
|
||||
PIC_ERROR_FILE,
|
||||
PIC_ERROR_READ
|
||||
} type;
|
||||
char *msg;
|
||||
pic_value irrs;
|
||||
};
|
||||
|
||||
#define pic_error_p(v) (pic_type(v) == PIC_TT_ERROR)
|
||||
#define pic_error_ptr(v) ((struct pic_error *)pic_ptr(v))
|
||||
|
||||
#endif
|
||||
@@ -87,6 +87,7 @@ enum pic_tt {
|
||||
PIC_TT_BLOB,
|
||||
PIC_TT_PROC,
|
||||
PIC_TT_PORT,
|
||||
PIC_TT_ERROR,
|
||||
PIC_TT_ENV,
|
||||
PIC_TT_CONT
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user