Index: /XIOS/trunk/src/declare_ref_func.hpp
===================================================================
--- /XIOS/trunk/src/declare_ref_func.hpp	(revision 750)
+++ /XIOS/trunk/src/declare_ref_func.hpp	(revision 751)
@@ -34,20 +34,21 @@
 void C##type::solveRefInheritance(bool apply)                          \
 {                                                                      \
-  std::set<C##type*> sset;                                             \
+  std::set<C##type*> refObjects;                                       \
   C##type* refer_ptr = this;                                           \
                                                                        \
   while (refer_ptr->hasDirect##type##Reference())                      \
   {                                                                    \
+    refObjects.insert(refer_ptr);                                      \
+                                                                       \
     refer_ptr = refer_ptr->getDirect##type##Reference();               \
                                                                        \
-    if (sset.end() != sset.find(refer_ptr))                            \
+    if (refObjects.end() != refObjects.find(refer_ptr))                \
     {                                                                  \
-      DEBUG(<< "Circular dependency stopped for #name object on "      \
-            << "\"" + refer_ptr->getId() + "\" !");                    \
-      break;                                                           \
+      ERROR("void C" #type "::solveRefInheritance(bool apply)",        \
+            << "Circular dependency stopped for " #name " object "     \
+            << "with id = \"" << refer_ptr->getId() << "\".");         \
     }                                                                  \
                                                                        \
     SuperClassAttribute::setAttributes(refer_ptr, apply);              \
-    sset.insert(refer_ptr);                                            \
   }                                                                    \
 }                                                                      \
@@ -61,19 +62,19 @@
 void C##type::solveBaseReference(void)                                 \
 {                                                                      \
-  std::set<C##type*> sset;                                             \
+  std::set<C##type*> refObjects;                                       \
   baseRefObject = C##type::get(this);                                  \
                                                                        \
   while (baseRefObject->hasDirect##type##Reference())                  \
   {                                                                    \
+    refObjects.insert(baseRefObject);                                  \
+                                                                       \
     baseRefObject = baseRefObject->getDirect##type##Reference();       \
                                                                        \
-    if (sset.end() != sset.find(baseRefObject))                        \
+    if (refObjects.end() != refObjects.find(baseRefObject))            \
     {                                                                  \
-      DEBUG(<< "Circular dependency stopped for #name object on "      \
-            << "\"" + baseRefObject->getId() + "\" !");                \
-      break;                                                           \
+      ERROR("void C" #type "::solveBaseReference(void)",               \
+            << "Circular dependency stopped for " #name " object "     \
+            << "with id = \"" << baseRefObject->getId() << "\".");     \
     }                                                                  \
-                                                                       \
-    sset.insert(baseRefObject);                                        \
   }                                                                    \
                                                                        \
