throw conserved_path_size_mismatch, hopefully we can catch it at some point
and then reset that analysis (hopefully).
I'd like to know why it breaks?
#include "alg/conserved_path.hpp"
-#include <stdexcept>
+#include "mussa_exceptions.hpp"
using namespace std;
bool ConservedPath::nextTo(const ConservedPath& next) const
{
if (size() != next.size() ) {
- throw runtime_error("paths must be the same length");
+ throw conserved_path_size_mismatch("paths must be the same length");
}
ConservedPath::const_iterator this_itor = begin();
ConservedPath::const_iterator next_itor = next.begin();
//! return true if all elements of the path are "next to" our current path.
/*! Next to is defined as being window index + 1
* that definition may not properly track reverse compliment
+ * \throws conserved_path_size_mismatch
*/
bool nextTo(const ConservedPath& next) const;
//! indicate which elements of the path are reversed
explicit motif_normalize_error(const std::string& msg) :
mussa_error(msg) {};
};
+
+//! ConservedPath::nextTo had two paths that weren't the same size
+class conserved_path_size_mismatch : public mussa_error
+{
+public:
+ explicit conserved_path_size_mismatch(const std::string& msg) :
+ mussa_error(msg) {};
+};
#endif