Windower / Fenestra

The open-source development version of Windower.
Other
19 stars 14 forks source link

Error messages stack trace missing. #11

Open Nifim opened 1 year ago

Nifim commented 1 year ago

Shown here as timers and burdometer load they error, but the details of the error are lacking, only stating "C++ exception" image

here is the init script used:

print('Initializing...')

local command = require('core.command')
local list = require('list')

setmetatable(_G, {
    __index = function(t, k)
        local ok, data = pcall(require, k)
        if not ok then
            return nil
        end

        t[k] = data
        return t[k]
    end,
})

local errors = list()

local input = function(str)
    local out = '[init] ' .. str
    print(out)
    local ok, error = pcall(command.input, str)
    if not ok then
        errors:add(out .. ' | ' .. error)
    end
end

for bind, cmd in pairs(require('binds')) do
    -- input('/bind ' .. bind .. ' "' .. cmd .. '"')
end

for alias, cmd in pairs(require('aliases')) do
    input('/alias ' .. alias .. ' /' .. cmd)
end

for _, addon_name in ipairs(require('addons')) do
    input('/load ' .. addon_name)
end

for _, error in pairs(errors) do
    print('Error/' .. error)
end