]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkFactory.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkFactory.cxx
index bc21a292287b96f3cdc776d07d76c3e4dcb812c4..3ca2be2cb787adcefe5539dbf404d3bd83feb7d0 100644 (file)
@@ -4,8 +4,8 @@ Program:   bbtk
 Module:    $RCSfile: bbtkFactory.cxx,v $
 Language:  C++
 
-Date:      $Date: 2008/07/01 07:58:28 $
-Version:   $Revision: 1.37 $
+Date:      $Date: 2008/09/10 09:25:19 $
+Version:   $Revision: 1.38 $
                                                                                 
 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
@@ -251,8 +251,8 @@ namespace bbtk
         if (ok)
         {
            bbtkMessage("debug",2,"   OK"<<std::endl);
-           break; // a package was found; we stop iterating
         }
+       break; // we stop iterating even if error : have to signal it to user
     } //------------------ // end for ( package_paths.begin();i!=package_paths.end() )
 
 }
@@ -267,10 +267,12 @@ namespace bbtk
       {
 #if defined(__GNUC__)
         bbtkError("Could not load package ["<< pkgname
-                  <<"] :" << std::endl << "   " << dlerror());
+                  <<"] :" << std::endl 
+                 << "  Opening "<<libname<<" failed"
+                 << "  Reason: "<< dlerror());
 #elif defined(_WIN32)
         bbtkError("Could not load package ["<<pkgname
-                 <<"] : " << std::endl << "   " <<libname<<" not found");
+                 <<"] :"<< std::endl << "   Error loading " <<libname);
 
     // look how to get the error message on win
     //<<dlerror());