[cig-commits] r11425 - cs/benchmark/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Wed Mar 12 11:03:26 PDT 2008


Author: luis
Date: 2008-03-12 11:03:25 -0700 (Wed, 12 Mar 2008)
New Revision: 11425

Modified:
   cs/benchmark/cigma/trunk/src/CubeCmd.cpp
Log:
Fixes to CubeCmd error messages


Modified: cs/benchmark/cigma/trunk/src/CubeCmd.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/CubeCmd.cpp	2008-03-12 18:03:24 UTC (rev 11424)
+++ cs/benchmark/cigma/trunk/src/CubeCmd.cpp	2008-03-12 18:03:25 UTC (rev 11425)
@@ -242,10 +242,10 @@
 
     int ierr;
 
+    cout << "Creating file " << output_filename << endl;
+
     if (writer->getType() == Writer::HDF_WRITER)
     {
-        cout << "Creating file " << output_filename << endl;
-
         HdfWriter *hdfWriter = static_cast<HdfWriter*>(writer);
         ierr = hdfWriter->open(output_filename);
         if (ierr < 0)
@@ -272,8 +272,6 @@
     }
     else if (writer->getType() == Writer::TXT_WRITER)
     {
-        cout << "Creating file " << output_filename << endl;
-
         TextWriter *txtWriter = static_cast<TextWriter*>(writer);
         ierr = txtWriter->open(output_filename);
         if (ierr < 0)
@@ -288,8 +286,6 @@
     }
     else if (writer->getType() == Writer::VTK_WRITER)
     {
-        cout << "Creating file " << output_filename << endl;
-
         VtkWriter *vtkWriter = static_cast<VtkWriter*>(writer);
         ierr = vtkWriter->open(output_filename);
         if (ierr < 0)
@@ -306,7 +302,8 @@
     }
     else
     {
-        cerr << "cube: File with bad extension?" << endl;
+        /* this should be unreachable */
+        cerr << "Fatal Error: Unsupported extension in output filename?" << endl;
         return 1;
     }
 



More information about the cig-commits mailing list