From b5c655050d1e97ce41a8da09315ff25af1e5fdff Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 10 Jul 2012 22:21:04 +0200 Subject: [PATCH] load: display a naughty notification when an error occurs on file loading --- rc.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rc.lua b/rc.lua index 1d3aa90..ff993f6 100644 --- a/rc.lua +++ b/rc.lua @@ -11,6 +11,11 @@ function loadrc(name) local path = awful.util.getdir("config") .. "/rc/" .. name .. ".lua" success, result = pcall(function() return dofile(path) end) if not success then + naughty.notify({ title = "Error while loading an RC file", + text = "When loading `" .. name .. + "`, got the following error:\n" .. result, + preset = naughty.config.presets.critical + }) return print("E: error loading RC file '" .. name .. "': " .. result) end return result