diff --git a/src/graph/edge.cc b/src/graph/edge.cc
index 9741be1afcd400835a07ceedf41803dec713aa3e..4f7530dc82e79dbb2d8985dd1546fa0caecd4d0c 100644
--- a/src/graph/edge.cc
+++ b/src/graph/edge.cc
@@ -18,14 +18,15 @@
 
 #include <sstream>
 
+#include <hpp/util/pointer.hh>
+#include <hpp/util/exception-factory.hh>
+
 #include <hpp/pinocchio/configuration.hh>
 #include <hpp/core/path-vector.hh>
 #include <hpp/core/path-validation.hh>
 
 #include <hpp/constraints/differentiable-function.hh>
 
-#include <hpp/util/pointer.hh>
-
 #include "hpp/manipulation/device.hh"
 #include "hpp/manipulation/problem.hh"
 #include "hpp/manipulation/graph-steering-method.hh"
@@ -81,8 +82,11 @@ namespace hpp {
         if (   (!src_contains_q0 && !src_contains_q1)
             || (!dst_contains_q0 && !dst_contains_q1)
             || (!src_contains_q0 && !dst_contains_q0))
-          throw std::runtime_error ("This path does not seem to have been "
-              "generated by this edge.");
+          HPP_THROW (std::runtime_error,
+              "Edge " << name() << " does not seem to have generated path from"
+              << pinocchio::displayConfig(q0) << " to "
+              << pinocchio::displayConfig(q1)
+              );
         return !(src_contains_q0 && (!src_contains_q1 || dst_contains_q1));
       }
 
@@ -100,8 +104,11 @@ namespace hpp {
         if (   (!src_contains_q0 && !src_contains_q1)
             || (!dst_contains_q0 && !dst_contains_q1)
             || (!src_contains_q0 && !dst_contains_q0))
-          throw std::runtime_error ("This path does not seem to have been "
-              "generated by this edge.");
+          HPP_THROW (std::runtime_error,
+              "Edge " << name() << " does not seem to have generated path from"
+              << pinocchio::displayConfig(q0) << " to "
+              << pinocchio::displayConfig(q1)
+              );
         return !(src_contains_q0 && (!src_contains_q1 || dst_contains_q1));
       }