summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--plop.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/plop.c b/plop.c
index 41b9138..445e3f8 100644
--- a/plop.c
+++ b/plop.c
@@ -183,6 +183,15 @@ int plop_handle_client(lua_State * L, struct epoll_event * event)
}
default:
{
+ const char * err = lua_tostring(c->L, -1);
+
+ if (NULL == err)
+ {
+ err = "Unknown error ocurred";
+ }
+
+ dprintf(2, "%s\n", err);
+ lua_pop(c->L, 1);
connection_free(L, c);
return -1;
}