diff options
| author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-09-18 22:37:59 -0300 | 
|---|---|---|
| committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-09-18 22:37:59 -0300 | 
| commit | 53d15c2c25199f8e44e9a8a74898f06a85e7c83b (patch) | |
| tree | c7d53772706ed78bee255100b328db11e3dc867e /src/nvim/api/private/defs.h | |
| parent | 67a16384a46c5eb51ba43d9150e95a1742cffbde (diff) | |
| parent | 4a8b52ea08bb5cf501cd20bce4744ae6c7edd9b1 (diff) | |
| download | rneovim-53d15c2c25199f8e44e9a8a74898f06a85e7c83b.tar.gz rneovim-53d15c2c25199f8e44e9a8a74898f06a85e7c83b.tar.bz2 rneovim-53d15c2c25199f8e44e9a8a74898f06a85e7c83b.zip  | |
Merge PR #1199 'Improvements to API error handling'
Diffstat (limited to 'src/nvim/api/private/defs.h')
| -rw-r--r-- | src/nvim/api/private/defs.h | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/api/private/defs.h b/src/nvim/api/private/defs.h index 2dd229ec5f..76ac23a521 100644 --- a/src/nvim/api/private/defs.h +++ b/src/nvim/api/private/defs.h @@ -8,6 +8,7 @@  #define ARRAY_DICT_INIT {.size = 0, .capacity = 0, .items = NULL}  #define STRING_INIT {.data = NULL, .size = 0}  #define OBJECT_INIT { .type = kObjectTypeNil } +#define ERROR_INIT { .set = false }  #define REMOTE_TYPE(type) typedef uint64_t type  #ifdef INCLUDE_GENERATED_DECLARATIONS @@ -16,8 +17,14 @@  #endif  // Basic types +typedef enum { +  kErrorTypeException, +  kErrorTypeValidation +} ErrorType; +  typedef struct { -  char msg[256]; +  ErrorType type; +  char msg[1024];    bool set;  } Error;  | 
