aboutsummaryrefslogtreecommitdiff
path: root/src/base/error/panicf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/error/panicf.c')
-rw-r--r--src/base/error/panicf.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/base/error/panicf.c b/src/base/error/panicf.c
new file mode 100644
index 0000000..d698576
--- /dev/null
+++ b/src/base/error/panicf.c
@@ -0,0 +1,16 @@
+#include "internal.h"
+
+void
+panicf(byte* fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+
+ printf("panic: ");
+ vprintf(fmt, args);
+ printf("\n");
+
+ va_end(args);
+
+ exit(1);
+}