use a specific exception when nextTo breaks
[mussa.git] / alg / conserved_path.cpp
index c67b4540d986b53940f52550c3e3a1c30c695ec5..52e0c39b5a3fc8d5c686a651ddd278e0bd5af173 100644 (file)
@@ -1,5 +1,5 @@
 #include "alg/conserved_path.hpp"
-#include <stdexcept>
+#include "mussa_exceptions.hpp"
 
 using namespace std;
 
@@ -119,7 +119,7 @@ ConservedPath::const_iterator ConservedPath::end() const
 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();