[GRASS-SVN] r60741 - grass/branches/releasebranch_7_0/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 8 01:52:20 PDT 2014


Author: martinl
Date: 2014-06-08 01:52:19 -0700 (Sun, 08 Jun 2014)
New Revision: 60741

Modified:
   grass/branches/releasebranch_7_0/lib/gis/parser.c
Log:
hcho: G_open_option_file(): more useful error message
      (merge r60518 from trunk)


Modified: grass/branches/releasebranch_7_0/lib/gis/parser.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/parser.c	2014-06-08 08:51:09 UTC (rev 60740)
+++ grass/branches/releasebranch_7_0/lib/gis/parser.c	2014-06-08 08:52:19 UTC (rev 60741)
@@ -1514,12 +1514,14 @@
 	if (stdinout)
 	    fp = stdin;
 	else if ((fp = fopen(option->answer, "r")) == NULL)
-	    G_fatal_error(_("Unable to read file [%s]"), option->answer);
+	    G_fatal_error(_("Unable to read %s file <%s>"),
+			    option->key, option->answer);
     } else if (strcmp(option->gisprompt, "new,file,file") == 0) {
 	if (stdinout)
 	    fp = stdout;
 	else if ((fp = fopen(option->answer, "w")) == NULL)
-	    G_fatal_error(_("Unable to create file [%s]"), option->answer);
+	    G_fatal_error(_("Unable to create %s file <%s>"),
+			    option->key, option->answer);
     } else
         G_fatal_error(_("Not a file option"));
 



More information about the grass-commit mailing list