summaryrefslogtreecommitdiff
path: root/libs/honeysuckle/src/hs_throw_error.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-04-16 11:55:09 -0500
committersanine <sanine.not@pm.me>2022-04-16 11:55:09 -0500
commitdb81b925d776103326128bf629cbdda576a223e7 (patch)
tree58bea8155c686733310009f6bed7363f91fbeb9d /libs/honeysuckle/src/hs_throw_error.c
parent55860037b14fb3893ba21cf2654c83d349cc1082 (diff)
move 3rd-party librarys into libs/ and add built-in honeysuckle
Diffstat (limited to 'libs/honeysuckle/src/hs_throw_error.c')
-rw-r--r--libs/honeysuckle/src/hs_throw_error.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/honeysuckle/src/hs_throw_error.c b/libs/honeysuckle/src/hs_throw_error.c
new file mode 100644
index 0000000..20a4c6d
--- /dev/null
+++ b/libs/honeysuckle/src/hs_throw_error.c
@@ -0,0 +1,12 @@
+#include <stdlib.h>
+
+#include "honeysuckle.h"
+
+void hs_throw_error(lua_State *L, const char *format_string, ...)
+{
+ va_list args;
+ va_start(args, format_string);
+ hs_vpushstring(L, format_string, args);
+ va_end(args);
+ lua_error(L);
+}