From: David Wells Date: Wed, 17 Aug 2016 17:42:35 +0000 (-0400) Subject: Assert input stream validity when reading XML. X-Git-Tag: v8.5.0-rc1~759^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56d111111374ccfead4bc4f7bb673881a7be0e51;p=dealii.git Assert input stream validity when reading XML. As was discovered in 2bc6f8c810, every other ParameterHandler method that takes an input stream argument and reads from it throws an exception if the input stream is not in a valid state. --- diff --git a/source/base/parameter_handler.cc b/source/base/parameter_handler.cc index 33056d14c8..7d92047a2a 100644 --- a/source/base/parameter_handler.cc +++ b/source/base/parameter_handler.cc @@ -1862,6 +1862,7 @@ namespace bool ParameterHandler::read_input_from_xml (std::istream &in) { + AssertThrow(in, ExcIO()); // read the XML tree assuming that (as we // do in print_parameters(XML) it has only // a single top-level node called