summaryrefslogtreecommitdiff
path: root/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'error.h')
-rw-r--r--error.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/error.h b/error.h
index 675c878..800e341 100644
--- a/error.h
+++ b/error.h
@@ -6,11 +6,16 @@
enum errcode {
OK = 0,
- UNKNOWN_ID
+ GENERAL_ERROR = 1,
+ COMMAND_NOT_FOUND = 2,
+ UNKNOWN_ID,
+ SYNTAX_ERROR
};
+/* FIXME: double fprintf is ugly */
#define error(v, ...) do { \
fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
exit(v); \
} while (0)