diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sofort/sofort.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/sofort/sofort.h b/include/sofort/sofort.h index 9d56acd..76b8b70 100644 --- a/include/sofort/sofort.h +++ b/include/sofort/sofort.h @@ -40,6 +40,23 @@ extern "C" { #define SFRT_OUTPUT_NAME 0x0001 /* dummy */ #define SFRT_OUTPUT_ADDRESS 0x0002 /* dummy */ +/* error flags */ +#define SFRT_ERROR_TOP_LEVEL 0x0001 +#define SFRT_ERROR_NESTED 0x0002 +#define SFRT_ERROR_CHILD 0x0004 +#define SFRT_ERROR_CUSTOM 0x0008 + +enum sfrt_custom_error { + SFRT_ERR_FLOW_ERROR, + SFRT_ERR_FLEE_ERROR, + SFRT_ERR_NULL_CONTEXT, + SFRT_ERR_NULL_SOURCE, + SFRT_ERR_INVALID_CONTEXT, + SFRT_ERR_INVALID_SOURCE, + SFRT_ERR_SOURCE_SIZE_ZERO, + SFRT_ERR_CAP, +}; + struct sfrt_source_version { int major; int minor; @@ -52,6 +69,18 @@ struct sfrt_input { size_t size; }; +struct sfrt_error_info { + const struct sfrt_driver_ctx * edctx; + const struct sfrt_unit_ctx * euctx; + const char * eunit; + int esyscode; + int elibcode; + const char * efunction; + int eline; + unsigned eflags; + void * eany; +}; + struct sfrt_common_ctx { uint64_t drvflags; uint64_t actflags; @@ -64,6 +93,7 @@ struct sfrt_driver_ctx { const char * program; const char * module; const struct sfrt_common_ctx * cctx; + struct sfrt_error_info ** errv; void * any; int status; int nerrors; |