summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index a55dc6f..a92541d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -41,15 +41,16 @@ int main(int argc, char **argv)
/* load main script */
honey_debug("loading '%s'\n", options.main_script);
- if (luaL_loadfile(L, options.main_script)) {
+ if (luaL_loadfile(L, options.main_script) != 0) {
const char *error = lua_tostring(L, -1);
honey_fatal("%s\n", error);
return 1;
}
- if (!hs_call(L, 0, 0)) {
+ if (hs_call(L, 0, 0) != 0) {
+ honey_debug("stack size: %d\n", lua_gettop(L));
const char *error = lua_tostring(L, -1);
- honey_fatal("unhandled error: %s", error);
+ honey_fatal("error loading main file: %s\n", error);
goto close; /* sorry */
}