From 418393d1ccb80dbda08267a675644dda4447e4f6 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Thu, 24 Jul 2014 20:56:33 +0200
Subject: [PATCH] Add Bad_function_call exception in NodeSelector

---
 include/hpp/manipulation/graph/node-selector.hh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/hpp/manipulation/graph/node-selector.hh b/include/hpp/manipulation/graph/node-selector.hh
index 2b1b218f..df4144c2 100644
--- a/include/hpp/manipulation/graph/node-selector.hh
+++ b/include/hpp/manipulation/graph/node-selector.hh
@@ -46,6 +46,17 @@ namespace hpp {
           std::ostream& print (std::ostream& os) const;
 
           /// Should never be called.
+          virtual void addNumericalConstraint (const core::DifferentiableFunctionPtr_t& /* function */)
+          {
+            HPP_THROW_EXCEPTION (Bad_function_call, "This component does not have constraints.");
+          }
+
+          /// Should never be called.
+          virtual void addLockedDofConstraint (const core::LockedDof& /* constraint */)
+          {
+            HPP_THROW_EXCEPTION (Bad_function_call, "This component does not have constraints.");
+          }
+
         protected:
           /// Initialization of the object.
           void init (const NodeSelectorPtr_t& weak);
-- 
GitLab