src/buffer_event.c

changeset 93
f0f5046ba1b0
parent 92
57662d96d8a8
parent 78
4782f315942f
child 96
570e309a8d3e
--- a/src/buffer_event.c	Sat Jan 15 19:46:55 2011 -0500
+++ b/src/buffer_event.c	Sat Jan 15 19:51:21 2011 -0500
@@ -1,7 +1,6 @@
 /* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
  * Licensed as LGPL - See doc/COPYING for details */
 #include "buffer_event.h"
-#include "luaevent.h"
 #include "utility.h"
 #include <lauxlib.h>
 #include <malloc.h>
@@ -49,7 +48,12 @@
 	/* func, bufferevent */
 	lua_pushinteger(L, what);
 	/* What to do w/ errors...? */
-	lua_pcall(L, 2, 0, 0);
+	if(!lua_pcall(L, 2, 0, 0))
+	{
+		/* FIXME: Perhaps luaevent users should be
+		 * able to set an error handler? */
+		lua_pop(L, 1); /* Pop error message */
+	}
 }
 
 static void buffer_event_readcb(struct bufferevent *ev, void *ptr) {

mercurial