]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add an assert in p::d::Tria::load() that the file exists 4371/head
authorDenis Davydov <davydden@gmail.com>
Thu, 11 May 2017 12:58:23 +0000 (14:58 +0200)
committerDenis Davydov <davydden@gmail.com>
Thu, 11 May 2017 12:58:23 +0000 (14:58 +0200)
source/distributed/tria.cc

index a28a55eb3e5d5091febadcb7f3240129bfa2e9c1..f2a9ed6282c178c4c3c86af1cf55da17751c3a4d 100644 (file)
@@ -1830,6 +1830,8 @@ namespace parallel
       {
         std::string fname=std::string(filename)+".info";
         std::ifstream f(fname.c_str());
+        Assert (f, ExcMessage("Could not open the file <" +
+                              fname + ">."));
         std::string firstline;
         getline(f, firstline); //skip first line
         f >> version >> numcpus >> attached_size >> attached_count >> n_coarse_cells;

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.