Skip to content

Commit 53a5097

Browse files
author
Jordan Bieder
committed
Tentatively fix bug with plot
1 parent 6ed7065 commit 53a5097

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

configure1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Initial information about the package
2-
AC_INIT([Agate],[1.3.1],[[email protected]])
2+
AC_INIT([Agate],[1.3.2],[[email protected]])
33

44
# Check source directory
55
AC_CONFIG_SRCDIR([bin/agate.cpp])

src/hist/histdatamd.cpp

+8-14
Original file line numberDiff line numberDiff line change
@@ -393,17 +393,9 @@ void HistDataMD::plot(unsigned tbegin, unsigned tend, std::istream &stream, Grap
393393
std::string function;
394394
auto pos = stream.tellg();
395395

396-
try {
397-
HistData::plot(tbegin, tend, stream, gplot, config);
398-
}
399-
catch ( Exception &e ) {
400-
if ( e.getReturnValue() == ERRABT ) {
401-
stream.clear();
402-
stream.seekg(pos);
403396
stream >> function;
404397

405398
std::string line;
406-
size_t pos = stream.tellg();
407399
std::getline(stream,line);
408400
stream.clear();
409401
stream.seekg(pos);
@@ -626,7 +618,14 @@ void HistDataMD::plot(unsigned tbegin, unsigned tend, std::istream &stream, Grap
626618
}
627619

628620
else {
629-
throw EXCEPTION(std::string("Function ")+function+std::string(" not available yet"),ERRABT);
621+
try {
622+
HistData::plot(tbegin, tend, stream, gplot, config);
623+
} catch (Exception &e) {
624+
e.ADD(std::string("Function ") + function +
625+
std::string(" not available yet"),
626+
ERRABT);
627+
throw e;
628+
}
630629
}
631630

632631
try {
@@ -637,11 +636,6 @@ void HistDataMD::plot(unsigned tbegin, unsigned tend, std::istream &stream, Grap
637636
}
638637
Graph::plot(config,gplot);
639638
stream.clear();
640-
}
641-
else {
642-
throw e;
643-
}
644-
}
645639
}
646640

647641
std::list<std::vector<double>> HistDataMD::getVACF(unsigned tbegin, unsigned tend) const {

0 commit comments

Comments
 (0)