patch 9.1.0984: exception handling can be improved

Problem:  exception handling can be improved
Solution: add v:stacktrace and getstacktrace()

closes: #16360

Co-authored-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
ichizok
2025-01-02 18:06:00 +01:00
committed by Christian Brabandt
parent fd771613b3
commit 663d18d610
17 changed files with 285 additions and 21 deletions

View File

@ -2170,6 +2170,8 @@ static funcentry_T global_functions[] =
ret_string, f_getregtype},
{"getscriptinfo", 0, 1, 0, arg1_dict_any,
ret_list_dict_any, f_getscriptinfo},
{"getstacktrace", 0, 0, 0, NULL,
ret_list_dict_any, f_getstacktrace},
{"gettabinfo", 0, 1, FEARG_1, arg1_number,
ret_list_dict_any, f_gettabinfo},
{"gettabvar", 2, 3, FEARG_1, arg3_number_string_any,