]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkFactory.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkFactory.cxx
index bc21a292287b96f3cdc776d07d76c3e4dcb812c4..b97670c988f4ec0c8c79c1f75e82843c99ffa2e4 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/10/02 12:29:26 $
+Version:   $Revision: 1.39 $
                                                                                 
 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
@@ -37,6 +37,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 #include <cctype>    // std::toupper
 
+#include <time.h>
 
 namespace bbtk
 {
@@ -251,8 +252,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 +268,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());