error function for Lua
This commit is contained in:
10
inout.c
10
inout.c
@@ -5,7 +5,7 @@
|
|||||||
** Also provides some predefined lua functions.
|
** 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 <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -264,3 +264,11 @@ void lua_obj2number (void)
|
|||||||
lua_pushnil();
|
lua_pushnil();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void luaI_error (void)
|
||||||
|
{
|
||||||
|
char *s = lua_getstring(lua_getparam(1));
|
||||||
|
if (s == NULL) s = "(no message)";
|
||||||
|
lua_error(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
3
inout.h
3
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 lua_print (void);
|
||||||
void luaI_type (void);
|
void luaI_type (void);
|
||||||
void lua_obj2number (void);
|
void lua_obj2number (void);
|
||||||
|
void luaI_error (void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user