diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-11-10 20:01:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-11-10 20:01:45 +0100 |
commit | 95f096030ed1a8afea028f2ea295d6f6a70f466f (patch) | |
tree | 9b1dcdbbe678ad1a3152f5cfd70a136efce6bc92 /src/option.c | |
parent | 459ca563128f2edb7e3bb190090bbb755a56dd55 (diff) | |
download | vim-git-95f096030ed1a8afea028f2ea295d6f6a70f466f.tar.gz |
patch 8.0.0074v8.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.
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/option.c b/src/option.c index ecfdc40dc..2b9ba2dcf 100644 --- a/src/option.c +++ b/src/option.c @@ -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); |