1
0
forked from aniani/vim

patch 8.0.0074

Problem:    Cannot make Vim fail on an internal error.
Solution:   Add IEMSG() and IEMSG2(). (Domenique Pelle)  Avoid reporting an
            internal error without mentioning where.
This commit is contained in:
Bram Moolenaar
2016-11-10 20:01:45 +01:00
parent 459ca56312
commit 95f096030e
30 changed files with 159 additions and 91 deletions

View File

@@ -5615,7 +5615,7 @@ was_set_insecurely(char_u *opt, int opt_flags)
flagp = insecure_flag(idx, opt_flags);
return (*flagp & P_INSECURE) != 0;
}
EMSG2(_(e_intern2), "was_set_insecurely()");
internal_error("was_set_insecurely()");
return -1;
}
@@ -5696,7 +5696,7 @@ set_string_option_direct(
if (idx < 0) /* not found (should not happen) */
{
EMSG2(_(e_intern2), "set_string_option_direct()");
EMSG2(_("For option %s"), name);
IEMSG2(_("For option %s"), name);
return;
}
}
@@ -9375,7 +9375,7 @@ option_iter_next(void **option, int opt_type)
ret = NULL;
break;
default:
EMSG2(_(e_intern2), "option_iter_next()");
internal_error("option_iter_next()");
return NULL;
}
}
@@ -10496,7 +10496,7 @@ get_varp(struct vimoption *p)
#ifdef FEAT_SIGNS
case PV_SCL: return (char_u *)&(curwin->w_p_scl);
#endif
default: EMSG(_("E356: get_varp ERROR"));
default: IEMSG(_("E356: get_varp ERROR"));
}
/* always return a valid pointer to avoid a crash! */
return (char_u *)&(curbuf->b_p_wm);