From c7677471918fa55095f4993484eb5805091364fd Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 13 May 2003 16:22:19 -0300 Subject: new (internal) macros for error handling --- ltests.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index b3f6d56b..7527c40a 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 1.158 2003/04/07 14:35:00 roberto Exp roberto $ +** $Id: ltests.c,v 1.159 2003/04/28 19:58:06 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -733,6 +733,15 @@ static int testC (lua_State *L) { luaL_setn(L, i, n); lua_pop(L, 1); } + else if EQ("throw") { +#ifdef _cplusplus +static struct X { int x; } x; + throw x; +#else + luaL_error(L, "C++"); +#endif + break; + } else luaL_error(L, "unknown instruction %s", buff); } return 0; -- cgit v1.2.3-55-g6feb