diff --git a/lib/wibox/widget/textbox.lua b/lib/wibox/widget/textbox.lua index fc0d0cfbe..90a37fe6c 100644 --- a/lib/wibox/widget/textbox.lua +++ b/lib/wibox/widget/textbox.lua @@ -69,8 +69,8 @@ function textbox:set_markup(text) end local attr, parsed = Pango.parse_markup(text, -1, 0) - -- In case of error, attr is false and parsed is an error message - if not attr then error(parsed) end + -- In case of error, attr is false and parsed is a GLib.Error instance. + if not attr then error(parsed.message or tostring(parsed)) end self._markup = text self._layout.text = parsed diff --git a/luaa.c b/luaa.c index 7629b51ca..42e5f95bd 100644 --- a/luaa.c +++ b/luaa.c @@ -323,6 +323,10 @@ luaA_panic(lua_State *L) static int luaA_dofunction_on_error(lua_State *L) { +#if LUA_VERSION_NUM >= 502 + /* Convert error to string, to prevent a follow-up error with lua_concat. */ + luaL_tolstring(L, -1, NULL); +#endif /* duplicate string error */ lua_pushvalue(L, -1); /* emit error signal */