1
0
forked from aniani/vim

patch 8.2.3750: error messages are everywhere

Problem:    Error messages are everywhere.
Solution:   Move more error messages to errors.h and adjust the names.
This commit is contained in:
Bram Moolenaar
2021-12-05 22:19:27 +00:00
parent 4700398e38
commit 40bcec1bac
18 changed files with 65 additions and 36 deletions

View File

@@ -5259,7 +5259,7 @@ theend:
if (fwv != (size_t)1)
retval = FAIL;
if (retval == FAIL)
emsg(_(e_write));
emsg(_(e_error_while_writing));
return retval;
}
@@ -5404,7 +5404,7 @@ put_node(
if (fd != NULL)
if (putc(np->wn_byte, fd) == EOF) // <byte> or <xbyte>
{
emsg(_(e_write));
emsg(_(e_error_while_writing));
return 0;
}
}
@@ -5815,7 +5815,7 @@ sug_write(spellinfo_T *spin, char_u *fname)
*/
if (fwrite(VIMSUGMAGIC, VIMSUGMAGICL, (size_t)1, fd) != 1) // <fileID>
{
emsg(_(e_write));
emsg(_(e_error_while_writing));
goto theend;
}
putc(VIMSUGVERSION, fd); // <versionnr>
@@ -5857,7 +5857,7 @@ sug_write(spellinfo_T *spin, char_u *fname)
len = (int)STRLEN(line) + 1;
if (fwrite(line, (size_t)len, (size_t)1, fd) == 0)
{
emsg(_(e_write));
emsg(_(e_error_while_writing));
goto theend;
}
spin->si_memtot += len;
@@ -5865,7 +5865,7 @@ sug_write(spellinfo_T *spin, char_u *fname)
// Write another byte to check for errors.
if (putc(0, fd) == EOF)
emsg(_(e_write));
emsg(_(e_error_while_writing));
vim_snprintf((char *)IObuff, IOSIZE,
_("Estimated runtime memory use: %d bytes"), spin->si_memtot);