aboutsummaryrefslogtreecommitdiffstats
path: root/src/err.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/err.h')
-rw-r--r--src/err.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/err.h b/src/err.h
index 6bb4697..bb5ced5 100644
--- a/src/err.h
+++ b/src/err.h
@@ -1,8 +1,19 @@
#ifndef SS_ERR_H
#define SS_ERR_H
+#include <errno.h>
#include <stdarg.h>
-void die(const char* err, ...);
+enum sf_error {
+ SF_OK = 0,
+ SF_ERR_INVALID_ARG = -1,
+ SF_ERR_INVALID_LEN = -2,
+ SF_ERR_EXEC_FAILED = -3,
+ SF_ERR_SIGNALED = -4,
+ SF_ERR_NOMEM = -ENOMEM,
+ SF_ERR_CANCEL = -1000,
+};
+
+void die(const char *err, ...);
#endif /* SS_ERR_H */