فهرست منبع

respect the error log file (merge from devbr6)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45826 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 14 سال پیش
والد
کامیت
ee857eab2a
1فایلهای تغییر یافته به همراه7 افزوده شده و 7 حذف شده
  1. 7 7
      lib/gis/error.c

+ 7 - 7
lib/gis/error.c

@@ -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
@@ -272,14 +272,14 @@ static void print_error(const char *msg, const int type)
     else {
 	G_init_logging();
 	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_GUI) {
 	    if (format != G_INFO_FORMAT_PLAIN) {
 		char *w;
 		int len, lead;
@@ -305,7 +305,7 @@ static void print_error(const char *msg, const int type)
 		mail_msg(msg, fatal);
 	    }
 	}
-	else {			/* GUI */
+	else {	/* GUI */
 	    print_sentence(stderr, type, msg);
 	}
     }