catch (const ParameterHandler::ExcEncounteredDeprecatedEntries &exc)
{
deallog << exc.get_exc_name() << std::endl;
- exc.print_info(deallog.get_file_stream());
+
+ // Filter out compiler-dependent information
+ std::stringstream tmp;
+ exc.print_info(tmp);
+ std::string filtered_error = tmp.str();
+ size_t function_begin = filtered_error.find("in function");
+
+ while (function_begin != filtered_error.npos)
+ {
+ size_t additional_begin =
+ filtered_error.find("Additional", function_begin);
+ filtered_error = filtered_error.substr(0, function_begin) + '\n' +
+ filtered_error.substr(additional_begin);
+ function_begin = filtered_error.find("in function");
+ }
+ deallog << filtered_error;
// Check that the deprecated entries are still accessible.
prm.enter_subsection("Testing");
DEAL::ExcEncounteredDeprecatedEntries(deprecation_messages)
- The following deprecated entries were encountered:
+DEAL:: The following deprecated entries were encountered:
--------------------------------------------------------
-An error occurred in file <parameter_handler.cc> in function
- void dealii::ParameterHandler::scan_line(std::string, const string&, unsigned int, bool)
+An error occurred in file <parameter_handler.cc>
Additional information:
Line <2> of file <prm/parameter_handler_3.prm>: Entry <string list> is
deprecated.
--------------------------------------------------------
--------------------------------------------------------
-An error occurred in file <parameter_handler.cc> in function
- void dealii::ParameterHandler::scan_line(std::string, const string&, unsigned int, bool)
+An error occurred in file <parameter_handler.cc>
Additional information:
Line <3> of file <prm/parameter_handler_3.prm>: Entry <int> is
deprecated.
--------------------------------------------------------
-DEAL::a, b, c
+a, b, c
DEAL::3
+++ /dev/null
-
-DEAL::ExcEncounteredDeprecatedEntries(deprecation_messages)
- The following deprecated entries were encountered:
-
-
---------------------------------------------------------
-An error occurred in file <parameter_handler.cc> in function
- void dealii::ParameterHandler::scan_line(std::string, const std::string &, const unsigned int, const bool)
-Additional information:
- Line <2> of file <prm/parameter_handler_3.prm>: Entry <string list> is
- deprecated.
---------------------------------------------------------
-
---------------------------------------------------------
-An error occurred in file <parameter_handler.cc> in function
- void dealii::ParameterHandler::scan_line(std::string, const std::string &, const unsigned int, const bool)
-Additional information:
- Line <3> of file <prm/parameter_handler_3.prm>: Entry <int> is
- deprecated.
---------------------------------------------------------
-
-DEAL::a, b, c
-DEAL::3