diff src/spellfile.c @ 26439:b18f3b0f317c v8.2.3750

patch 8.2.3750: error messages are everywhere Commit: https://github.com/vim/vim/commit/40bcec1bac34d34a3d4d7c5f6b2cc1f163acbd00 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 5 22:19:27 2021 +0000 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Dec 2021 23:30:05 +0100
parents 7d3c296a117f
children cf986610be6a
line wrap: on
line diff
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -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 *fna
      */
     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 *fna
 	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 *fna
 
     // 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);