From 7b78b6986e714cbd7653b89287b928974eb5ee4f Mon Sep 17 00:00:00 2001 From: sanine Date: Sat, 1 Jan 2022 13:24:33 -0600 Subject: initial commit --- src/honeysuckle/hs_throw_error.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/honeysuckle/hs_throw_error.c (limited to 'src/honeysuckle/hs_throw_error.c') 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 + +#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); +} -- cgit v1.2.1