You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
--[[
|
|
|
|
/*
|
|
|
|
* MODULE
|
|
|
|
*/
|
|
|
|
--]]
|
|
|
|
|
|
|
|
local utils = {}
|
|
|
|
utils.api = require('libmodal/src/utils/api')
|
|
|
|
utils.Help = require('libmodal/src/utils/Help')
|
|
|
|
utils.WindowState = require('libmodal/src/utils/WindowState')
|
|
|
|
|
|
|
|
--[[
|
|
|
|
/*
|
|
|
|
* FUNCTIONS
|
|
|
|
*/
|
|
|
|
--]]
|
|
|
|
|
|
|
|
----------------------------------
|
|
|
|
--[[ SUMMARY:
|
|
|
|
* Show an error from `pcall()`.
|
|
|
|
]]
|
|
|
|
--[[ PARAMS:
|
|
|
|
`pcall_err` => the error generated by `pcall()`.
|
|
|
|
]]
|
|
|
|
----------------------------------
|
|
|
|
function utils.show_error(pcall_err)
|
|
|
|
utils.api.nvim_bell()
|
|
|
|
utils.api.nvim_show_err(
|
|
|
|
require('libmodal/src/globals').DEFAULT_ERROR_TITLE,
|
|
|
|
api.nvim_get_vvar('throwpoint')
|
|
|
|
.. '\n' ..
|
|
|
|
api.nvim_get_vvar('exception')
|
|
|
|
.. '\n' ..
|
|
|
|
tostring(pcall_err)
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
--[[
|
|
|
|
/*
|
|
|
|
* PUBLICIZE MODULE
|
|
|
|
*/
|
|
|
|
--]]
|
|
|
|
|
|
|
|
return utils
|