From 23ae8d95e32e4b9fb11d190e5bac9f41e6126797 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Tue, 6 Oct 2020 11:03:11 +0200 Subject: [PATCH] Improve error message of ExcFileNotOpen --- include/deal.II/base/exceptions.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index 171411eb07..588fa60d9d 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -743,7 +743,19 @@ namespace StandardExceptions */ DeclException1(ExcFileNotOpen, std::string, - << "Could not open file " << arg1 << "."); + << "Could not open file " << arg1 + << "." + "\n\n" + "If this happens during an operation that tries to read " + "data: you may be " + "trying to read from a file that doesn't exist or that is " + "not readable given its file permissions." + "\n\n" + "If this happens during an operation that tries to write " + "data: you may be trying to write to a file to which file " + "or directory permissions do not allow you to write. A " + "typical example is where you specify an output file in " + "a directory that does not exist."); /** * Exception denoting a part of the library or application program that has -- 2.39.5