The message argument ot IMP_assert is actually sent directly to a stream so you don't need to construct the message ahead of time: IMP_assert(something, "Error on " << value);
Notification of IMP commits wrote: > Author: kerenl@SALILAB.ORG > Date: 2008-09-08 11:29:24 -0700 (Mon, 08 Sep 2008) > New Revision: 706 > > Modified: > trunk/domino/src/RestraintGraph.cpp > Log: > add error message in optimize function, in case that no min combinations have been found > > Modified: trunk/domino/src/RestraintGraph.cpp > =================================================================== > --- trunk/domino/src/RestraintGraph.cpp 2008-09-08 18:26:50 UTC (rev 705) > +++ trunk/domino/src/RestraintGraph.cpp 2008-09-08 18:29:24 UTC (rev 706) > @@ -279,6 +279,7 @@ > > void RestraintGraph::infer() > { > + show(); > min_combs->clear(); > std::stringstream err_msg; > err_msg << "RestraintGraph::infer the graph has already been infered." > @@ -290,6 +291,9 @@ > distribute_evidence(root); > //min_combs = node_data[root]->find_minimum(); > std::vector<CombState *>* temp_min_combs = node_data[root]->find_minimum(); > + err_msg.clear(); > + err_msg << "RestraintGraph::infer the number of minimum solutions is 0"; > + IMP_assert(temp_min_combs->size()>0, err_msg.str()); > // distribute the minimu combinations and return the final full comb state. > CombState *min_comb = new CombState(**(temp_min_combs->begin())); > distribute_minimum(root, min_comb); > > _______________________________________________ > IMP-commits mailing list > IMP-commits@salilab.org > https://salilab.org/mailman/listinfo/imp-commits >