[GRASS-SVN] r60518 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue May 27 09:14:18 PDT 2014
Author: hcho
Date: 2014-05-27 09:14:18 -0700 (Tue, 27 May 2014)
New Revision: 60518
Modified:
grass/trunk/lib/gis/parser.c
Log:
G_open_option_file(): more useful error message
Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c 2014-05-27 15:29:08 UTC (rev 60517)
+++ grass/trunk/lib/gis/parser.c 2014-05-27 16:14:18 UTC (rev 60518)
@@ -1512,12 +1512,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