]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Abort the program if the input file could not be read.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 13 Feb 2011 22:31:07 +0000 (22:31 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 13 Feb 2011 22:31:07 +0000 (22:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@23350 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-32/step-32.cc

index 0aa794f39b986e4ce698954c564f59a963630399..b971f40ac28992967f29544405a5bf7f2f6f37d2 100644 (file)
@@ -3474,7 +3474,9 @@ void BoussinesqFlowProblem<dim>::run (const std::string parameter_filename)
        std::exit (1);
       }
 
-    prm.read_input (parameter_file);
+    const bool success = prm.read_input (parameter_file);
+    AssertThrow (success, ExcMessage ("Invalid input parameter file."));
+
     parameters.parse_parameters (prm);
   }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.