beautiful.init: use xpcall / debug.backtrace

This commit is contained in:
Daniel Hahler 2015-07-16 15:24:22 +02:00
parent f060fc055f
commit ddb1f64acd
1 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,8 @@ function beautiful.init(config)
if type(config) == 'string' then
-- Expand the '~' $HOME shortcut
config = config:gsub("^~/", homedir .. "/")
success, theme = pcall(function() return dofile(config) end)
success, theme = xpcall(function() return dofile(config) end,
debug.traceback)
elseif type(config) == 'table' then
success = true
theme = config