fix(ui-ext): log and clear error in ui_comp_event (#21147)

* fix: log and clear error in ui_comp_event

* fix: handling error in each map_foreach_value iteration

* fix: handling error decl in for_each loop

* fix: updating initerr to const, removing initerr free-ing

* fix: using ERROR_SET for error check

* fix: wrapping ERROR_INIT in parens to allow for including inside macro
This commit is contained in:
Andrew Willette
2022-11-30 14:32:57 -06:00
committed by GitHub
parent ef5ab2bf76
commit 282dda643a
3 changed files with 7 additions and 4 deletions

View File

@@ -12,7 +12,7 @@
#define ARRAY_DICT_INIT KV_INITIAL_VALUE
#define STRING_INIT { .data = NULL, .size = 0 }
#define OBJECT_INIT { .type = kObjectTypeNil }
#define ERROR_INIT { .type = kErrorTypeNone, .msg = NULL }
#define ERROR_INIT ((Error) { .type = kErrorTypeNone, .msg = NULL })
#define REMOTE_TYPE(type) typedef handle_T type
#define ERROR_SET(e) ((e)->type != kErrorTypeNone)