From c2bb9abceceef125554595e23b7cc18ad3555c7c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 16 May 2005 18:19:00 -0300 Subject: better quotes for strings in error messages --- lbaselib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lbaselib.c') diff --git a/lbaselib.c b/lbaselib.c index badce346..0c794e5a 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.173 2005/03/28 17:17:53 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.174 2005/05/16 19:21:11 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -39,7 +39,8 @@ static int luaB_print (lua_State *L) { lua_call(L, 1, 1); s = lua_tostring(L, -1); /* get result */ if (s == NULL) - return luaL_error(L, "`tostring' must return a string to `print'"); + return luaL_error(L, LUA_SM " must return a string to " LUA_SM, + "tostring", "print"); if (i>1) fputs("\t", stdout); fputs(s, stdout); lua_pop(L, 1); /* pop result */ @@ -148,7 +149,8 @@ static int luaB_setfenv (lua_State *L) { return 0; } else if (lua_iscfunction(L, -2) || lua_setfenv(L, -2) == 0) - luaL_error(L, "`setfenv' cannot change environment of given object"); + luaL_error(L, LUA_SM " cannot change environment of given object", + "setfenv"); return 1; } -- cgit v1.2.3-55-g6feb