diff options
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/structs.h b/src/structs.h index 7a4d7fbe42..31accea050 100644 --- a/src/structs.h +++ b/src/structs.h @@ -815,13 +815,23 @@ struct msglist }; /* + * The exception types. + */ +typedef enum +{ + ET_USER, /* exception caused by ":throw" command */ + ET_ERROR, /* error exception */ + ET_INTERRUPT /* interrupt exception triggered by Ctrl-C */ +} except_type_T; + +/* * Structure describing an exception. * (don't use "struct exception", it's used by the math library). */ typedef struct vim_exception except_T; struct vim_exception { - int type; /* exception type */ + except_type_T type; /* exception type */ char_u *value; /* exception value */ struct msglist *messages; /* message(s) causing error exception */ char_u *throw_name; /* name of the throw point */ @@ -830,13 +840,6 @@ struct vim_exception }; /* - * The exception types. - */ -#define ET_USER 0 /* exception caused by ":throw" command */ -#define ET_ERROR 1 /* error exception */ -#define ET_INTERRUPT 2 /* interrupt exception triggered by Ctrl-C */ - -/* * Structure to save the error/interrupt/exception state between calls to * enter_cleanup() and leave_cleanup(). Must be allocated as an automatic * variable by the (common) caller of these functions. |