Skip to content

Commit

Permalink
Tentatively fix bug with plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Bieder committed Jul 5, 2021
1 parent 6ed7065 commit 53a5097
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion configure1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Initial information about the package
AC_INIT([Agate],[1.3.1],[[email protected]])
AC_INIT([Agate],[1.3.2],[[email protected]])

# Check source directory
AC_CONFIG_SRCDIR([bin/agate.cpp])
Expand Down
22 changes: 8 additions & 14 deletions src/hist/histdatamd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 {
Expand All @@ -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<std::vector<double>> HistDataMD::getVACF(unsigned tbegin, unsigned tend) const {
Expand Down

0 comments on commit 53a5097

Please sign in to comment.