diff options
author | William Wilgus <me.theuser@yahoo.com> | 2019-09-06 20:19:42 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2019-09-06 20:19:42 -0500 |
commit | bbd4a6cb9162d5e98ff9ba9c7d3489e0a774d441 (patch) | |
tree | efd292ec3162af99de47a66df09b7ca918555c32 /apps/plugins/lua/rocklua.c | |
parent | 267d04d2bd2a7681c8bbcfbb655612101440b765 (diff) | |
download | rockbox-bbd4a6cb9162d5e98ff9ba9c7d3489e0a774d441.tar.gz rockbox-bbd4a6cb9162d5e98ff9ba9c7d3489e0a774d441.zip |
Lua extend error splash timeout and stop cutting off info
Change-Id: Ia1a9e39b9f203002cbbea85ef965e66c334b83fc
Diffstat (limited to 'apps/plugins/lua/rocklua.c')
-rw-r--r-- | apps/plugins/lua/rocklua.c | 7 |
1 files changed, 4 insertions, 3 deletions
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) { | |||
87 | lua_pushliteral(L, ""); | 87 | lua_pushliteral(L, ""); |
88 | else if (!lua_isstring(L, arg+1)) return 1; /* message is not a string */ | 88 | else if (!lua_isstring(L, arg+1)) return 1; /* message is not a string */ |
89 | else lua_pushliteral(L, "\n"); | 89 | else lua_pushliteral(L, "\n"); |
90 | lua_pushliteral(L, "stack traceback:"); | 90 | lua_pushliteral(L, "stack traceback: "); |
91 | while (lua_getstack(L1, level++, &ar)) { | 91 | while (lua_getstack(L1, level++, &ar)) { |
92 | if (level > LEVELS1 && firstpart) { | 92 | if (level > LEVELS1 && firstpart) { |
93 | /* no more than `LEVELS2' more levels? */ | 93 | /* no more than `LEVELS2' more levels? */ |
@@ -103,7 +103,8 @@ static int db_errorfb (lua_State *L) { | |||
103 | } | 103 | } |
104 | lua_pushliteral(L, "\n\t"); | 104 | lua_pushliteral(L, "\n\t"); |
105 | lua_getinfo(L1, "Snl", &ar); | 105 | lua_getinfo(L1, "Snl", &ar); |
106 | lua_pushfstring(L, "%s:", ar.short_src); | 106 | char* filename = strrchr(ar.short_src, '/'); |
107 | lua_pushfstring(L, "%s:", filename ? filename : ar.short_src); | ||
107 | if (ar.currentline > 0) | 108 | if (ar.currentline > 0) |
108 | lua_pushfstring(L, "%d:", ar.currentline); | 109 | lua_pushfstring(L, "%d:", ar.currentline); |
109 | if (*ar.namewhat != '\0') /* is there a name? */ | 110 | if (*ar.namewhat != '\0') /* is there a name? */ |
@@ -210,7 +211,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
210 | 211 | ||
211 | if (lu_status) { | 212 | if (lu_status) { |
212 | DEBUGF("%s\n", lua_tostring(Ls, -1)); | 213 | DEBUGF("%s\n", lua_tostring(Ls, -1)); |
213 | rb->splash(5 * HZ, lua_tostring(Ls, -1)); | 214 | rb->splash(10 * HZ, lua_tostring(Ls, -1)); |
214 | /*lua_pop(Ls, 1);*/ | 215 | /*lua_pop(Ls, 1);*/ |
215 | } | 216 | } |
216 | lua_close(Ls); | 217 | lua_close(Ls); |