diff --git a/inout.c b/inout.c index 711193fa..3e6b472b 100644 --- a/inout.c +++ b/inout.c @@ -5,7 +5,7 @@ ** Also provides some predefined lua functions. */ -char *rcs_inout="$Id: inout.c,v 2.7 1994/11/03 22:34:29 roberto Exp roberto $"; +char *rcs_inout="$Id: inout.c,v 2.8 1994/11/07 16:34:44 roberto Exp roberto $"; #include #include @@ -264,3 +264,11 @@ void lua_obj2number (void) lua_pushnil(); } + +void luaI_error (void) +{ + char *s = lua_getstring(lua_getparam(1)); + if (s == NULL) s = "(no message)"; + lua_error(s); +} + diff --git a/inout.h b/inout.h index 0714f1a4..8155bbe4 100644 --- a/inout.h +++ b/inout.h @@ -1,5 +1,5 @@ /* -** $Id: inout.h,v 1.3 1994/11/02 20:29:39 roberto Exp roberto $ +** $Id: inout.h,v 1.4 1994/11/03 22:34:29 roberto Exp roberto $ */ @@ -23,5 +23,6 @@ void lua_internaldostring (void); void lua_print (void); void luaI_type (void); void lua_obj2number (void); +void luaI_error (void); #endif