From 53a5097c206cee7b47b70456b222d3d350fe656d Mon Sep 17 00:00:00 2001 From: Jordan Bieder Date: Mon, 5 Jul 2021 15:17:32 +0200 Subject: [PATCH] Tentatively fix bug with plot --- configure1 | 2 +- src/hist/histdatamd.cpp | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/configure1 b/configure1 index 7b90ada..c6de8ec 100644 --- a/configure1 +++ b/configure1 @@ -1,5 +1,5 @@ # Initial information about the package -AC_INIT([Agate],[1.3.1],[jordan.bieder@uliege.be]) +AC_INIT([Agate],[1.3.2],[jordan.bieder@uliege.be]) # Check source directory AC_CONFIG_SRCDIR([bin/agate.cpp]) diff --git a/src/hist/histdatamd.cpp b/src/hist/histdatamd.cpp index 463e873..14974b8 100644 --- a/src/hist/histdatamd.cpp +++ b/src/hist/histdatamd.cpp @@ -393,17 +393,9 @@ void HistDataMD::plot(unsigned tbegin, unsigned tend, std::istream &stream, Grap std::string function; auto pos = stream.tellg(); - try { - HistData::plot(tbegin, tend, stream, gplot, config); - } - catch ( Exception &e ) { - if ( e.getReturnValue() == ERRABT ) { - stream.clear(); - stream.seekg(pos); stream >> function; std::string line; - size_t pos = stream.tellg(); std::getline(stream,line); stream.clear(); stream.seekg(pos); @@ -626,7 +618,14 @@ void HistDataMD::plot(unsigned tbegin, unsigned tend, std::istream &stream, Grap } else { - throw EXCEPTION(std::string("Function ")+function+std::string(" not available yet"),ERRABT); + try { + HistData::plot(tbegin, tend, stream, gplot, config); + } catch (Exception &e) { + e.ADD(std::string("Function ") + function + + std::string(" not available yet"), + ERRABT); + throw e; + } } try { @@ -637,11 +636,6 @@ void HistDataMD::plot(unsigned tbegin, unsigned tend, std::istream &stream, Grap } Graph::plot(config,gplot); stream.clear(); - } - else { - throw e; - } - } } std::list> HistDataMD::getVACF(unsigned tbegin, unsigned tend) const {