Pārlūkot izejas kodu

wxGUI: print reason why rendering failed

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48030 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 gadi atpakaļ
vecāks
revīzija
738633a3a8
1 mainītis faili ar 11 papildinājumiem un 10 dzēšanām
  1. 11 10
      gui/wxpython/gui_modules/render.py

+ 11 - 10
gui/wxpython/gui_modules/render.py

@@ -974,18 +974,19 @@ class Map(object):
                                                      subkey = 'color')))
         
         if maps:
-            ret = gcmd.RunCommand('g.pnmcomp',
-                                  overwrite = True,
-                                  input = '%s' % ",".join(maps),
-                                  mask = '%s' % ",".join(masks),
-                                  opacity = '%s' % ",".join(opacities),
-                                  bgcolor = bgcolor,
-                                  width = self.width,
-                                  height = self.height,
-                                  output = self.mapfile)
+            ret, msg = gcmd.RunCommand('g.pnmcomp',
+                                       getErrorMsg = True,
+                                       overwrite = True,
+                                       input = '%s' % ",".join(maps),
+                                       mask = '%s' % ",".join(masks),
+                                       opacity = '%s' % ",".join(opacities),
+                                       bgcolor = bgcolor,
+                                       width = self.width,
+                                       height = self.height,
+                                       output = self.mapfile)
             
             if ret != 0:
-                print >> sys.stderr, _("ERROR: Rendering failed")
+                print >> sys.stderr, _("ERROR: Rendering failed. Details: %s") % msg
                 return None
         
         Debug.msg (3, "Map.Render() force=%s file=%s" % (force, self.mapfile))