Skip to content

Commit a1dd2f8

Browse files
committed
fix: catch extension errors when configuring
1 parent 53b742a commit a1dd2f8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lua/resession/config.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ M.setup = function(config)
5555
if ext_config then
5656
local ext = util.get_extension(ext_name)
5757
if ext and ext.config then
58-
ext.config(ext_config)
58+
local ok, err = pcall(ext.config, ext_config)
59+
if not ok then
60+
vim.notify(
61+
string.format("Error configuring resession extension %s: %s", ext_name, err),
62+
vim.log.levels.ERROR
63+
)
64+
end
5965
end
6066
end
6167
end

0 commit comments

Comments
 (0)