]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Assert that the file we read in fact exists.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Sep 2011 01:27:06 +0000 (01:27 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Sep 2011 01:27:06 +0000 (01:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@24307 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/coarse_grid_common.h

index e2a2b39b5fbd7e069e36d9c8d5391dbe1cd7ec48..76a4cdda5aed23e89acb8f43935d6b78a353d58e 100644 (file)
@@ -29,6 +29,8 @@
 void cat_file(const char * filename)
 {
   std::ifstream in(filename);
+  Assert (in, ExcIO());
+  
   while (in)
     {
       std::string s;
@@ -36,7 +38,7 @@ void cat_file(const char * filename)
       deallog.get_file_stream() << s << "\n";
     }
   in.close();
-
+  
   std::remove (filename);
 }
 

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.