summaryrefslogtreecommitdiff
path: root/exports/error.h
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-26 14:50:22 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-26 15:33:04 +0200
commit7e4494256a08f585523e01b1bbc51f41ff4e2b95 (patch)
treeccbf873b2bfb11aa22f185e78ce1e2e5eebd094c /exports/error.h
parent448c51d2142c186f0490b9d51c0d73beb3c76863 (diff)
Refactor: Errors into custom export types and expose types
Diffstat (limited to 'exports/error.h')
-rw-r--r--exports/error.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/exports/error.h b/exports/error.h
new file mode 100644
index 0000000..64592e1
--- /dev/null
+++ b/exports/error.h
@@ -0,0 +1,17 @@
+#ifndef ERROR_H
+#define ERROR_H
+
+typedef enum errorLevel {
+ ERR_OTHER,
+ ERR_INFO,
+ ERR_WARNING,
+ ERR_FATAL,
+} errorLevel;
+
+typedef struct error {
+ errorLevel level;
+ const char* traceback;
+ const char* cause;
+} error;
+
+#endif /* ERROR_H */