mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
vim-patch:9.1.0984: exception handling can be improved
Problem: exception handling can be improved
Solution: add v:stacktrace and getstacktrace()
closes: vim/vim#16360
663d18d610
Co-authored-by: ichizok <gclient.gaap@gmail.com>
Co-authored-by: Naruhiko Nishino <naru123456789@gmail.com>
This commit is contained in:
@ -4670,6 +4670,25 @@ M.funcs = {
|
||||
returns = 'vim.fn.getscriptinfo.ret[]',
|
||||
signature = 'getscriptinfo([{opts}])',
|
||||
},
|
||||
getstacktrace = {
|
||||
args = 0,
|
||||
desc = [=[
|
||||
Returns the current stack trace of Vim scripts.
|
||||
Stack trace is a |List|, of which each item is a |Dictionary|
|
||||
with the following items:
|
||||
funcref The funcref if the stack is at the function,
|
||||
otherwise this item is not exist.
|
||||
event The string of the event description if the
|
||||
stack is at autocmd event, otherwise this item
|
||||
is not exist.
|
||||
lnum The line number of the script on the stack.
|
||||
filepath The file path of the script on the stack.
|
||||
]=],
|
||||
name = 'getstacktrace',
|
||||
params = {},
|
||||
returns = 'table[]',
|
||||
signature = 'getstacktrace()',
|
||||
},
|
||||
gettabinfo = {
|
||||
args = { 0, 1 },
|
||||
base = 1,
|
||||
|
Reference in New Issue
Block a user