From f388ee4a822b3d8027ed7c28aa21e9406e4a11eb Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 22 Apr 2002 11:40:23 -0300 Subject: new way to handle errors --- ltable.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index c71179d1..0403f3c2 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 1.102 2002/03/18 18:18:35 roberto Exp roberto $ +** $Id: ltable.c,v 1.103 2002/04/05 18:54:31 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -111,7 +111,7 @@ static int luaH_index (lua_State *L, Table *t, const TObject *key) { else { const TObject *v = luaH_get(t, key); if (v == &luaO_nilobject) - luaD_error(L, "invalid key for `next'"); + luaD_runerror(L, "invalid key for `next'"); i = cast(int, (cast(const lu_byte *, v) - cast(const lu_byte *, val(node(t, 0)))) / sizeof(Node)); return i + t->sizearray; /* hash elements are numbered after array ones */ @@ -220,7 +220,7 @@ static void setnodevector (lua_State *L, Table *t, int lsize) { int size; if (lsize < MINHASHSIZE) lsize = MINHASHSIZE; else if (lsize > MAXBITS) - luaD_error(L, "table overflow"); + luaD_runerror(L, "table overflow"); size = twoto(lsize); t->node = luaM_newvector(L, size, Node); for (i=0; iflags = 0; -- cgit v1.2.3-55-g6feb