summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-25 22:03:12 -0400
committermidipix <writeonce@midipix.org>2016-10-25 22:45:18 -0400
commitb03974ba314764900754acca3cc59ccd8fc7ee65 (patch)
tree57af192ad25f10495f661c139fcfce53d1e829c5 /include
parent89dfb4c2e7dec3e7da42e81becd88cd4a4612109 (diff)
downloadsofort-b03974ba314764900754acca3cc59ccd8fc7ee65.tar.bz2
sofort-b03974ba314764900754acca3cc59ccd8fc7ee65.tar.xz
sofort.h: added public error trace definitions.
Diffstat (limited to 'include')
-rw-r--r--include/sofort/sofort.h30
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;