diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-18 12:19:27 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-18 12:19:27 -0300 |
commit | 1dbe708aa84f3a1e51daf8d7e2f714e2b02f554b (patch) | |
tree | e845de9ee24b94362146e38410ae0670df18526b /llex.c | |
parent | 8f080fd683d63b0cd4b38380f6a5bdae5d6e2584 (diff) | |
download | lua-1dbe708aa84f3a1e51daf8d7e2f714e2b02f554b.tar.gz lua-1dbe708aa84f3a1e51daf8d7e2f714e2b02f554b.tar.bz2 lua-1dbe708aa84f3a1e51daf8d7e2f714e2b02f554b.zip |
new protocol for error handling
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 1.103 2002/06/03 14:09:57 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.104 2002/06/03 20:12:21 roberto Exp roberto $ |
3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -61,7 +61,7 @@ static void luaX_error (LexState *ls, const char *s, const char *token) { | |||
61 | char buff[MAXSRC]; | 61 | char buff[MAXSRC]; |
62 | luaO_chunkid(buff, getstr(ls->source), MAXSRC); | 62 | luaO_chunkid(buff, getstr(ls->source), MAXSRC); |
63 | luaO_pushfstring(L, "%s:%d: %s near `%s'", buff, ls->linenumber, s, token); | 63 | luaO_pushfstring(L, "%s:%d: %s near `%s'", buff, ls->linenumber, s, token); |
64 | luaD_errorobj(L, L->top - 1, LUA_ERRSYNTAX); | 64 | luaD_throw(L, LUA_ERRSYNTAX); |
65 | } | 65 | } |
66 | 66 | ||
67 | 67 | ||