initial exception handling support

This commit is contained in:
Yuichi Nishiwaki
2013-11-17 17:25:26 +09:00
parent 5668ae1b29
commit fdc9bfea4e
9 changed files with 203 additions and 1 deletions
+18
View File
@@ -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
+1
View File
@@ -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
};