2022-07-12 21:26:11 +00:00
|
|
|
-- Error logging module
|
|
|
|
local loghandler = io.open(os.getenv("HOME").."/.awesome_errors","w")
|
2022-07-23 19:10:02 +00:00
|
|
|
local naughty = require("naughty")
|
2022-07-12 21:26:11 +00:00
|
|
|
if awesome.startup_errors then
|
|
|
|
loghandler:write("[STARTUP] "..tostring(awesome.startup_errors).."\n")
|
2022-07-23 19:10:02 +00:00
|
|
|
naughty.notify({title = "ERROR", text = tostring(awesome.startup_errors)})
|
2022-07-12 21:26:11 +00:00
|
|
|
end
|
|
|
|
do
|
|
|
|
local in_error = false
|
|
|
|
awesome.connect_signal("debug::error", function(err)
|
|
|
|
if in_error then return end
|
|
|
|
in_error = true
|
|
|
|
loghandler:write("[RUNTIME] "..tostring(err).."\n")
|
2022-07-23 19:10:02 +00:00
|
|
|
naughty.notify({title = "ERROR", text = tostring(err)})
|
2022-07-12 21:26:11 +00:00
|
|
|
in_error = false
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|