瀏覽代碼

r3.out.vtk: improved error message when output cannot be written

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73693 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 6 年之前
父節點
當前提交
b19bbd784f
共有 2 個文件被更改,包括 4 次插入5 次删除
  1. 1 2
      raster3d/r3.out.vtk/main.c
  2. 3 3
      raster3d/r3.out.vtk/r3.out.vtk.html

+ 1 - 2
raster3d/r3.out.vtk/main.c

@@ -417,8 +417,7 @@ int main(int argc, char *argv[])
         fp = fopen(param.output->answer, "w");
         if (fp == NULL) {
             perror(param.output->answer);
-            G_usage();
-            exit(EXIT_FAILURE);
+            G_fatal_error(_("Unable to open file <%s>"), param.output->answer);
         }
     } else
         fp = stdout;

+ 3 - 3
raster3d/r3.out.vtk/r3.out.vtk.html

@@ -153,11 +153,11 @@ g.region -dp3 res=1000 res3=1000
 r.mapcalc "bottom = 100"
 
 #export of volume to VTK:
-r3.out.vtk -s in=precip3d.500z50 top=dem500 bottom=bottom
-out=/tmp/slovakia3d.vtk
+r3.out.vtk -s in=precip3d.500z50 top=dem500 bottom=bottom \
+   output=/path/to/slovakia3d.vtk
 
 # visualize in paraview or other VTK viewer:
-paraview --data=/tmp/slovakia3d.vtk
+paraview --data=/path/to/slovakia3d.vtk
 # set Display style to 'surface#
 # set Actor Control z to 10
 </pre></div>