diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-08 18:06:15 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-08 18:06:15 -0200 |
| commit | 65f28f0824411bfe375a1dfa08c9cdc0eea2cb36 (patch) | |
| tree | 2f00d3edcd53495e17fa60ea07ee8a12c47fb577 /inout.c | |
| parent | 2cf954b8ae08a9094354551ee3733f4ff8078443 (diff) | |
| download | lua-65f28f0824411bfe375a1dfa08c9cdc0eea2cb36.tar.gz lua-65f28f0824411bfe375a1dfa08c9cdc0eea2cb36.tar.bz2 lua-65f28f0824411bfe375a1dfa08c9cdc0eea2cb36.zip | |
error function for Lua
Diffstat (limited to 'inout.c')
| -rw-r--r-- | inout.c | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -5,7 +5,7 @@ | |||
| 5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | char *rcs_inout="$Id: inout.c,v 2.7 1994/11/03 22:34:29 roberto Exp roberto $"; | 8 | char *rcs_inout="$Id: inout.c,v 2.8 1994/11/07 16:34:44 roberto Exp roberto $"; |
| 9 | 9 | ||
| 10 | #include <stdio.h> | 10 | #include <stdio.h> |
| 11 | #include <stdlib.h> | 11 | #include <stdlib.h> |
| @@ -264,3 +264,11 @@ void lua_obj2number (void) | |||
| 264 | lua_pushnil(); | 264 | lua_pushnil(); |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | |||
| 268 | void luaI_error (void) | ||
| 269 | { | ||
| 270 | char *s = lua_getstring(lua_getparam(1)); | ||
| 271 | if (s == NULL) s = "(no message)"; | ||
| 272 | lua_error(s); | ||
| 273 | } | ||
| 274 | |||
