diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-13 16:11:02 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-13 16:11:02 -0200 |
| commit | 101cee3032918bae8a5fa9dfc334c478c4aa15f6 (patch) | |
| tree | 3f5b01dd2d7357fbd6f6e625d53f4c4b574261b2 | |
| parent | eb7312d9be8286b8be3b929136d7dc34f50ef822 (diff) | |
| download | lua-101cee3032918bae8a5fa9dfc334c478c4aa15f6.tar.gz lua-101cee3032918bae8a5fa9dfc334c478c4aa15f6.tar.bz2 lua-101cee3032918bae8a5fa9dfc334c478c4aa15f6.zip | |
LUA_ERRERR also cannot generate error message
| -rw-r--r-- | ldo.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -273,11 +273,9 @@ LUA_API int lua_loadfile (lua_State *L, const char *filename) { | |||
| 273 | LUA_API int lua_loadbuffer (lua_State *L, const char *buff, size_t size, | 273 | LUA_API int lua_loadbuffer (lua_State *L, const char *buff, size_t size, |
| 274 | const char *name) { | 274 | const char *name) { |
| 275 | ZIO z; | 275 | ZIO z; |
| 276 | int status; | ||
| 277 | if (!name) name = "?"; | 276 | if (!name) name = "?"; |
| 278 | luaZ_mopen(&z, buff, size, name); | 277 | luaZ_mopen(&z, buff, size, name); |
| 279 | status = protectedparser(L, &z, buff[0]==LUA_SIGNATURE[0]); | 278 | return protectedparser(L, &z, buff[0]==LUA_SIGNATURE[0]); |
| 280 | return status; | ||
| 281 | } | 279 | } |
| 282 | 280 | ||
| 283 | 281 | ||
| @@ -330,7 +328,7 @@ void luaD_breakrun (lua_State *L, int errcode) { | |||
| 330 | longjmp(L->errorJmp->b, 1); | 328 | longjmp(L->errorJmp->b, 1); |
| 331 | } | 329 | } |
| 332 | else { | 330 | else { |
| 333 | if (errcode != LUA_ERRMEM) | 331 | if (errcode != LUA_ERRMEM && errcode != LUA_ERRERR) |
| 334 | message(L, "unable to recover; exiting\n"); | 332 | message(L, "unable to recover; exiting\n"); |
| 335 | exit(EXIT_FAILURE); | 333 | exit(EXIT_FAILURE); |
| 336 | } | 334 | } |
