From 7cc2a786642ac90438de668241d65f49df646c99 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 24 Mar 2016 14:21:56 -0500 Subject: [PATCH] Improve an error message. In particular, say which file could not be opened and what the error code is. --- source/base/data_out_base.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.5