summaryrefslogtreecommitdiff
path: root/src/honeysuckle/hs_throw_error.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-01-01 13:24:33 -0600
committersanine <sanine.not@pm.me>2022-01-01 13:24:33 -0600
commit7b78b6986e714cbd7653b89287b928974eb5ee4f (patch)
treeb6334336f722e44bf3020e316976ed5ed3b85ba0 /src/honeysuckle/hs_throw_error.c
initial commit
Diffstat (limited to 'src/honeysuckle/hs_throw_error.c')
-rw-r--r--src/honeysuckle/hs_throw_error.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/honeysuckle/hs_throw_error.c b/src/honeysuckle/hs_throw_error.c
new file mode 100644
index 0000000..20a4c6d
--- /dev/null
+++ b/src/honeysuckle/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);
+}