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:
zeertzjq
2025-01-03 20:12:15 +08:00
parent 06ff5480ce
commit d5308637bf
15 changed files with 294 additions and 9 deletions

View File

@@ -2,6 +2,7 @@
#include <stdbool.h>
#include "nvim/eval/typval_defs.h"
#include "nvim/pos_defs.h"
/// A list used for saving values of "emsg_silent". Used by ex_try() to save the
@@ -107,6 +108,7 @@ struct vim_exception {
msglist_T *messages; ///< message(s) causing error exception
char *throw_name; ///< name of the throw point
linenr_T throw_lnum; ///< line number of the throw point
list_T *stacktrace; ///< stacktrace
except_T *caught; ///< next exception on the caught stack
};