]> Creatis software - bbtk.git/blobdiff - kernel/appli/bbRegenerateBoxesLists/bbRegenerateBoxesLists.cpp
*** empty log message ***
[bbtk.git] / kernel / appli / bbRegenerateBoxesLists / bbRegenerateBoxesLists.cpp
index 5f6612456e7aafcb1c52520b155a7faa39667068..6104957203182abfeeb8dbbae532b93842efc9e9 100644 (file)
@@ -6,24 +6,32 @@
 int main(int argc, char **argv)
 {
 
-       bbtk::Interpreter::Pointer I = bbtk::Interpreter::New();
-    I->SetCommandLine(true);
-    I->SetThrow(false);
-    
-
-       std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path();
-       doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
-       doc_path += "bbdoc";
-       doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
-
-    I->InterpretLine( "exec freeze");
-    I->InterpretLine( "include *");
-       I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Initials,doc_path + "index-alpha.html");
+  try
+    {
+      bbtk::Interpreter::Pointer I = bbtk::Interpreter::New();
+      I->SetCommandLine(true);
+      I->SetThrow(false);
+      
+      
+      std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path();
+      doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+      doc_path += "bbdoc";
+      doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+      
+      I->InterpretLine( "exec freeze");
+      I->InterpretLine( "include *");
+      I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Initials,doc_path + "index-alpha.html");
        I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Packages,doc_path + "index-package.html");
        I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Categories,doc_path + "index-category.html");
        I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Adaptors,doc_path + "index-adaptors.html");
-
-       return 0;
+       
+    }
+  catch (bbtk::Exception e)
+    {
+      std::cout << "* ERROR : "<<e.GetErrorMessage()<<std::endl;
+      return 1;
+    }
+  return 0;
 }
 //==========================================================================