[GRASS-SVN] r45825 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Apr 3 00:08:50 EDT 2011


Author: hamish
Date: 2011-04-02 21:08:50 -0700 (Sat, 02 Apr 2011)
New Revision: 45825

Modified:
   grass/branches/develbranch_6/lib/gis/error.c
Log:
respect the error log file

Modified: grass/branches/develbranch_6/lib/gis/error.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/error.c	2011-04-02 09:21:43 UTC (rev 45824)
+++ grass/branches/develbranch_6/lib/gis/error.c	2011-04-03 04:08:50 UTC (rev 45825)
@@ -3,7 +3,7 @@
  * 
  * \brief GIS Library: Error messages functions
  *
- * (C) 1999-2009, 2011 by the GRASS Development Team
+ * (C) 1999-2011 by the GRASS Development Team
  *
  * This program is free software under the GNU General Public
  * License (>=v2). Read the file COPYING that comes with GRASS
@@ -268,14 +268,14 @@
     }
     else {
 	format = G_info_format();
+
+	if (type == WARN || type == ERR)
+	    log_error(msg, fatal);
+
 	if (format == G_INFO_FORMAT_SILENT)
 	    return;
-	
+
 	if (format != G_INFO_FORMAT_GUI) {
-	    if (type == WARN || type == ERR) {
-		log_error(msg, fatal);
-	    }
-
 	    if (format != G_INFO_FORMAT_PLAIN) {
 		char *w;
 		int len, lead;
@@ -301,7 +301,7 @@
 		mail_msg(msg, fatal);
 	    }
 	}
-	else {			/* GUI */
+	else {	/* GUI */
 	    print_sentence(stderr, type, msg);
 	}
     }



More information about the grass-commit mailing list