From: Wolfgang Bangerth Date: Thu, 24 Mar 2016 19:21:56 +0000 (-0500) Subject: Improve an error message. X-Git-Tag: v8.5.0-rc1~1175^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2406%2Fhead;p=dealii.git Improve an error message. In particular, say which file could not be opened and what the error code is. --- diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 8e5a78bbd7..9e14e4aa7f 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -6153,7 +6153,12 @@ void DataOutInterface::write_vtu_in_parallel (const char *filename MPI_File fh; err = MPI_File_open(comm, const_cast(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