fix(exception): remember whether message is multiline (#25351)

This commit is contained in:
zeertzjq
2023-09-25 08:23:24 +08:00
committed by GitHub
parent 8195c18006
commit 9e7c4fe579
5 changed files with 44 additions and 10 deletions

View File

@@ -157,7 +157,7 @@ int aborted_in_try(void)
/// When several messages appear in the same command, the first is usually the
/// most specific one and used as the exception value. The "severe" flag can be
/// set to true, if a later but severer message should be used instead.
bool cause_errthrow(const char *mesg, bool severe, bool *ignore)
bool cause_errthrow(const char *mesg, bool multiline, bool severe, bool *ignore)
FUNC_ATTR_NONNULL_ALL
{
msglist_T *elem;
@@ -249,6 +249,7 @@ bool cause_errthrow(const char *mesg, bool severe, bool *ignore)
elem = xmalloc(sizeof(msglist_T));
elem->msg = xstrdup(mesg);
elem->multiline = multiline;
elem->next = NULL;
elem->throw_msg = NULL;
*plist = elem;