From 56d111111374ccfead4bc4f7bb673881a7be0e51 Mon Sep 17 00:00:00 2001 From: David Wells Date: Wed, 17 Aug 2016 13:42:35 -0400 Subject: [PATCH] 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. --- source/base/parameter_handler.cc | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.5