]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve an error message. 2406/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 24 Mar 2016 19:21:56 +0000 (14:21 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 24 Mar 2016 19:21:56 +0000 (14:21 -0500)
In particular, say which file could not be opened and what the error code is.

source/base/data_out_base.cc

index 8e5a78bbd70e1fd700d48ee56003347700a14d60..9e14e4aa7f2f1e96771e86b06e0717716ade94c7 100644 (file)
@@ -6153,7 +6153,12 @@ void DataOutInterface<dim,spacedim>::write_vtu_in_parallel (const char *filename
   MPI_File fh;
   err = MPI_File_open(comm, const_cast<char *>(filename),
                       MPI_MODE_CREATE | MPI_MODE_WRONLY, info, &fh);
-  AssertThrow(err==0, ExcMessage("Unable to open file with MPI_File_open!"));
+  AssertThrow(err==0,
+              ExcMessage("Unable to open file <"
+                         + std::string(filename) +
+                         "> with MPI_File_open. The error code "
+                         "returned was "
+                         + Utilities::to_string(err) + "."));
 
 
   MPI_File_set_size(fh, 0); // delete the file contents

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.