From 5b60bc212a0d4105931f3de193d8d69ef8153ae7 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 1 Aug 2015 18:25:10 +0200 Subject: [PATCH] textbox.set_markup: handle `parsed.message` from Pango.parse_markup Ref: https://github.com/pavouk/lgi/issues/115 Fixes: https://github.com/awesomeWM/awesome/issues/301 --- lib/wibox/widget/textbox.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wibox/widget/textbox.lua b/lib/wibox/widget/textbox.lua index c8096c53..007ed0c8 100644 --- a/lib/wibox/widget/textbox.lua +++ b/lib/wibox/widget/textbox.lua @@ -63,8 +63,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