aboutsummaryrefslogtreecommitdiff
path: root/include/dtree/dyn_err.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dtree/dyn_err.h')
-rw-r--r--include/dtree/dyn_err.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/dtree/dyn_err.h b/include/dtree/dyn_err.h
new file mode 100644
index 0000000..23dae0f
--- /dev/null
+++ b/include/dtree/dyn_err.h
@@ -0,0 +1,29 @@
+
+/* Make sure we're not included multiple times */
+#ifndef _DYN_ERR_H
+#define _DYN_ERR_H
+
+/* Also make sure we're _always_ interpreted as a C file */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Define some generic error codes first that we can propagate **/
+typedef enum dt_err {
+
+ /* General purpose error codes */
+ FAILURE = -1,
+ SUCCESS = 0,
+
+ INVALID_PARAMS,
+ MALLOC_FAILED,
+ INVALID_PAYLOAD
+
+} dt_err;
+
+const char *rdb_error_getmsg(dt_err *e);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _DYN_ERR_H */ \ No newline at end of file