aboutsummaryrefslogtreecommitdiffstats
path: root/handerror.c
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2020-09-28 15:37:00 +0300
committerJoursoir <chat@joursoir.net>2020-09-28 15:37:00 +0300
commitac79cbd424d2339ff34112e142d289a51f90d3a6 (patch)
treefb049fa112bb6ec224f5dbadf0e4dd37c7aed8fc /handerror.c
downloadlock-password-ac79cbd424d2339ff34112e142d289a51f90d3a6.tar.gz
lock-password-ac79cbd424d2339ff34112e142d289a51f90d3a6.tar.bz2
lock-password-ac79cbd424d2339ff34112e142d289a51f90d3a6.zip
init project
Diffstat (limited to 'handerror.c')
-rw-r--r--handerror.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/handerror.c b/handerror.c
new file mode 100644
index 0000000..482b467
--- /dev/null
+++ b/handerror.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+void call_error(int num)
+{
+ fprintf(stderr, "Sorry, there was an error in the program [#%d]\n", num);
+ exit(3);
+}
+
+void print_error(char *text)
+{
+ fprintf(stderr, "%s", text);
+ exit(4);
+}
+