summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lua
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-09-06 20:19:42 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2019-09-06 20:19:42 -0500
commitbbd4a6cb9162d5e98ff9ba9c7d3489e0a774d441 (patch)
treeefd292ec3162af99de47a66df09b7ca918555c32 /apps/plugins/lua
parent267d04d2bd2a7681c8bbcfbb655612101440b765 (diff)
downloadrockbox-bbd4a6cb9162d5e98ff9ba9c7d3489e0a774d441.tar.gz
rockbox-bbd4a6cb9162d5e98ff9ba9c7d3489e0a774d441.tar.bz2
rockbox-bbd4a6cb9162d5e98ff9ba9c7d3489e0a774d441.zip
Lua extend error splash timeout and stop cutting off info
Change-Id: Ia1a9e39b9f203002cbbea85ef965e66c334b83fc
Diffstat (limited to 'apps/plugins/lua')
-rw-r--r--apps/plugins/lua/ldebug.c2
-rw-r--r--apps/plugins/lua/rocklua.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/apps/plugins/lua/ldebug.c b/apps/plugins/lua/ldebug.c
index cf882467d0..0b3c5721f3 100644
--- a/apps/plugins/lua/ldebug.c
+++ b/apps/plugins/lua/ldebug.c
@@ -708,7 +708,7 @@ static void addinfo (lua_State *L, const char *msg) {
char buff[LUA_IDSIZE]; /* add file:line information */
int line = currentline(L, ci);
luaO_chunkid(buff, getstr(getluaproto(ci)->source), LUA_IDSIZE);
- luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
+ luaO_pushfstring(L, "%s: %d: %s", buff, line, msg);
}
}
diff --git a/apps/plugins/lua/rocklua.c b/apps/plugins/lua/rocklua.c
index cb2b6eb161..b6e7a02261 100644
--- a/apps/plugins/lua/rocklua.c
+++ b/apps/plugins/lua/rocklua.c
@@ -87,7 +87,7 @@ static int db_errorfb (lua_State *L) {
lua_pushliteral(L, "");
else if (!lua_isstring(L, arg+1)) return 1; /* message is not a string */
else lua_pushliteral(L, "\n");
- lua_pushliteral(L, "stack traceback:");
+ lua_pushliteral(L, "stack traceback: ");
while (lua_getstack(L1, level++, &ar)) {
if (level > LEVELS1 && firstpart) {
/* no more than `LEVELS2' more levels? */
@@ -103,7 +103,8 @@ static int db_errorfb (lua_State *L) {
}
lua_pushliteral(L, "\n\t");
lua_getinfo(L1, "Snl", &ar);
- lua_pushfstring(L, "%s:", ar.short_src);
+ char* filename = strrchr(ar.short_src, '/');
+ lua_pushfstring(L, "%s:", filename ? filename : ar.short_src);
if (ar.currentline > 0)
lua_pushfstring(L, "%d:", ar.currentline);
if (*ar.namewhat != '\0') /* is there a name? */
@@ -210,7 +211,7 @@ enum plugin_status plugin_start(const void* parameter)
if (lu_status) {
DEBUGF("%s\n", lua_tostring(Ls, -1));
- rb->splash(5 * HZ, lua_tostring(Ls, -1));
+ rb->splash(10 * HZ, lua_tostring(Ls, -1));
/*lua_pop(Ls, 1);*/
}
lua_close(Ls);