diff options
author | ZyX <kp-pav@yandex.ru> | 2017-07-31 02:05:02 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-07-31 02:05:02 +0300 |
commit | fbe60af538aa6c723779ae7a816de845460619ae (patch) | |
tree | b541ffeeaa5046de170cac688c72aeb891c61ebb /src/nvim/ex_eval.h | |
parent | 1011462b40502e6039494e70a870f0360f152b1b (diff) | |
parent | 13e8356f52d9dc1da96179ee425168740874c8c7 (diff) | |
download | rneovim-fbe60af538aa6c723779ae7a816de845460619ae.tar.gz rneovim-fbe60af538aa6c723779ae7a816de845460619ae.tar.bz2 rneovim-fbe60af538aa6c723779ae7a816de845460619ae.zip |
Merge branch 'master' into colored-cmdline
Diffstat (limited to 'src/nvim/ex_eval.h')
-rw-r--r-- | src/nvim/ex_eval.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/nvim/ex_eval.h b/src/nvim/ex_eval.h index f61e01d25b..d5f8737bf3 100644 --- a/src/nvim/ex_eval.h +++ b/src/nvim/ex_eval.h @@ -89,28 +89,29 @@ struct msglist { struct msglist *next; /* next of several messages in a row */ }; +// 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 */ - char_u *value; /* exception value */ - struct msglist *messages; /* message(s) causing error exception */ - char_u *throw_name; /* name of the throw point */ - linenr_T throw_lnum; /* line number of the throw point */ - except_T *caught; /* next exception on the caught stack */ + 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 + linenr_T throw_lnum; // line number of the throw point + except_T *caught; // next exception on the caught stack }; /* - * 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. |