diff options
author | midipix <writeonce@midipix.org> | 2016-10-26 14:22:25 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-10-26 22:10:13 -0400 |
commit | 615ccce232a31e0323b5079f5d67ccffd2904230 (patch) | |
tree | b97227fe4c172055fe17e1aa0766d9dd70978099 /include | |
parent | 7d169947a63ffb57533efea62835d65a01ef4845 (diff) | |
download | apimagic-615ccce232a31e0323b5079f5d67ccffd2904230.tar.bz2 apimagic-615ccce232a31e0323b5079f5d67ccffd2904230.tar.xz |
apimagic.h: added public error trace definitions.
Diffstat (limited to 'include')
-rw-r--r-- | include/apimagic/apimagic.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/apimagic/apimagic.h b/include/apimagic/apimagic.h index add4e08..1d51bd9 100644 --- a/include/apimagic/apimagic.h +++ b/include/apimagic/apimagic.h @@ -41,6 +41,23 @@ extern "C" { #define AMGC_DRIVER_VERSION 0x0010 #define AMGC_DRIVER_DRY_RUN 0x0020 +/* error flags */ +#define AMGC_ERROR_TOP_LEVEL 0x0001 +#define AMGC_ERROR_NESTED 0x0002 +#define AMGC_ERROR_CHILD 0x0004 +#define AMGC_ERROR_CUSTOM 0x0008 + +enum amgc_custom_error { + AMGC_ERR_FLOW_ERROR, + AMGC_ERR_FLEE_ERROR, + AMGC_ERR_NULL_CONTEXT, + AMGC_ERR_NULL_SOURCE, + AMGC_ERR_INVALID_CONTEXT, + AMGC_ERR_INVALID_SOURCE, + AMGC_ERR_SOURCE_SIZE_ZERO, + AMGC_ERR_CAP, +}; + enum amgc_action_type { AMGC_ACTION_NONE, AMGC_ACTION_OUTPUT, @@ -81,6 +98,18 @@ struct amgc_action { int subset; }; +struct amgc_error_info { + const struct amgc_driver_ctx * edctx; + const struct amgc_unit_ctx * euctx; + const char * eunit; + int esyscode; + int elibcode; + const char * efunction; + int eline; + unsigned eflags; + void * eany; +}; + struct amgc_common_ctx { uint64_t drvflags; uint64_t actflags; @@ -95,6 +124,7 @@ struct amgc_driver_ctx { const char * program; const char * module; const struct amgc_common_ctx * cctx; + struct amgc_error_info ** errv; void * any; int status; int nerrors; |