Remove dynamic exceptions
[anna.git] / example / dbos / workdir / main.cpp
index 3b9c99f..fa3dbd8 100644 (file)
@@ -29,7 +29,7 @@
 using namespace std;
 using namespace workdir;
 
-template <typename T> void message (const char* text, T* tt) throw () {
+template <typename T> void message (const char* text, T* tt) {
    if (Logger::isActive (Logger::Debug) == false)
       return;
 
@@ -51,7 +51,7 @@ public:
    
    WorkDirectory ();
 
-   xml::Node* asXML (xml::Node* parent) const throw ();
+   xml::Node* asXML (xml::Node* parent) const ;
    
 private:
    typedef vector <storage::File*> file_container;
@@ -62,17 +62,17 @@ private:
    filesystem::Directory* a_root;
    file_container a_files;
 
-   void initialize () throw (RuntimeException); 
-   void run () throw (RuntimeException);
+   void initialize () noexcept(false); 
+   void run () noexcept(false);
    
-   void forward (filesystem::Directory*) throw (RuntimeException);
-   void instantiateOne (filesystem::Directory*) throw (RuntimeException);   
-   void fullCache (filesystem::Directory*, file_container&, const int flags) throw (RuntimeException);   
-   void reuseHoles (filesystem::Directory*, file_container&) throw (RuntimeException);
-   void destroyObjects (filesystem::Directory* dir, file_container&) throw (RuntimeException);
-   void clear (file_container&) throw ();
+   void forward (filesystem::Directory*) noexcept(false);
+   void instantiateOne (filesystem::Directory*) noexcept(false);   
+   void fullCache (filesystem::Directory*, file_container&, const int flags) noexcept(false);   
+   void reuseHoles (filesystem::Directory*, file_container&) noexcept(false);
+   void destroyObjects (filesystem::Directory* dir, file_container&) noexcept(false);
+   void clear (file_container&) ;
    
-   static void load (filesystem::Directory* parent, const int maxLevel, const int level = 0) throw (RuntimeException);
+   static void load (filesystem::Directory* parent, const int maxLevel, const int level = 0) noexcept(false);
 };
 
 using namespace std;
@@ -111,12 +111,12 @@ WorkDirectory::WorkDirectory () :
 }
 
 void WorkDirectory::initialize ()
-   throw (RuntimeException)
+   noexcept(false)
 {
 }
 
 void WorkDirectory::run () 
-   throw (RuntimeException)
+   noexcept(false)
 {
    LOGMETHOD (TraceMethod tm ("WorkDirectory", "run", ANNA_FILE_LOCATION)); 
 
@@ -146,7 +146,7 @@ void WorkDirectory::run ()
 }  
 
 xml::Node* WorkDirectory::asXML (xml::Node* parent) const
-   throw ()
+   
 {
    xml::Node* result = app::Application::asXML (parent);
    a_repository.asXML (result);
@@ -154,7 +154,7 @@ xml::Node* WorkDirectory::asXML (xml::Node* parent) const
 }
 
 void WorkDirectory::forward (filesystem::Directory* dir)
-   throw (RuntimeException)
+   noexcept(false)
 {
    cout << "forward: " << dir->getPath () << endl;
    
@@ -182,7 +182,7 @@ void WorkDirectory::forward (filesystem::Directory* dir)
  * de verdad sea necesario.
  */ 
 void WorkDirectory::instantiateOne (filesystem::Directory* dir) 
-   throw (RuntimeException)
+   noexcept(false)
 {
    TraceMethod tm ("WorkDirectory", "instantiateOne", ANNA_FILE_LOCATION);
    
@@ -210,7 +210,7 @@ void WorkDirectory::instantiateOne (filesystem::Directory* dir)
 }
 
 void WorkDirectory::fullCache (filesystem::Directory* dir, WorkDirectory::file_container& files, const int flags) 
-   throw (RuntimeException)
+   noexcept(false)
 {
    TraceMethod tm ("WorkDirectory", "fullCache", ANNA_FILE_LOCATION);
    
@@ -246,7 +246,7 @@ void WorkDirectory::fullCache (filesystem::Directory* dir, WorkDirectory::file_c
 }
 
 void WorkDirectory::reuseHoles (filesystem::Directory* dir, WorkDirectory::file_container& files)
-   throw (RuntimeException)
+   noexcept(false)
 {
    TraceMethod tm ("WorkDirectory", "reuseHoles", ANNA_FILE_LOCATION);
    
@@ -257,7 +257,7 @@ void WorkDirectory::reuseHoles (filesystem::Directory* dir, WorkDirectory::file_
 }
 
 void WorkDirectory::destroyObjects (filesystem::Directory* dir, WorkDirectory::file_container& files)
-   throw (RuntimeException)
+   noexcept(false)
 {
    TraceMethod tm ("WorkDirectory", "destroyObjects", ANNA_FILE_LOCATION);
    
@@ -293,7 +293,7 @@ void WorkDirectory::destroyObjects (filesystem::Directory* dir, WorkDirectory::f
 
 
 void WorkDirectory::clear (WorkDirectory::file_container& files)
-   throw ()
+   
 {
    storage::File* file;
    
@@ -319,7 +319,7 @@ void WorkDirectory::clear (WorkDirectory::file_container& files)
 
 /*static*/
 void WorkDirectory::load (filesystem::Directory* parent, const int maxLevel, const int level) 
-   throw (RuntimeException)
+   noexcept(false)
 {
    if (level == maxLevel)
       return;