]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Interface.cxx
Parameters are now part of the pipeline update process
[cpPlugins.git] / lib / cpPlugins / Interface / Interface.cxx
index e4160c623869688f6cfe63bccf98208521651838..4d470b68c4e2d96ec6a4aa1f5ba81714110acc9c 100644 (file)
@@ -61,61 +61,96 @@ CreateProcessObject( const std::string& name ) const
 bool cpPlugins::Interface::Interface::
 Load( const std::string& path )
 {
-  if( this->m_Pluma.load( path ) )
+  bool ret = true;
+  try
   {
-    this->_LoadClasses( );
-    return( true );
+    ret = this->m_Pluma.load( path );
+    if( ret )
+      this->_LoadClasses( );
   }
-  else
-    return( false );
+  catch( ... )
+  {
+    ret = false;
+
+  } // yrt
+  return( ret );
 }
 
 // -------------------------------------------------------------------------
 bool cpPlugins::Interface::Interface::
 Load( const std::string& folder, const std::string& name )
 {
-  if( this->m_Pluma.load( folder, name ) )
+  bool ret = true;
+  try
   {
-    this->_LoadClasses( );
-    return( true );
+    ret = this->m_Pluma.load( folder, name );
+    if( ret )
+      this->_LoadClasses( );
   }
-  else
-    return( false );
+  catch( ... )
+  {
+    ret = false;
+
+  } // yrt
+  return( ret );
 }
 
 // -------------------------------------------------------------------------
 int cpPlugins::Interface::Interface::
 LoadFromFolder( const std::string& folder, bool r )
 {
-  if( this->m_Pluma.loadFromFolder( folder, r ) )
+  bool ret = true;
+  try
   {
-    this->_LoadClasses( );
-    return( true );
+    ret = this->m_Pluma.loadFromFolder( folder, r );
+    if( ret )
+      this->_LoadClasses( );
   }
-  else
-    return( false );
+  catch( ... )
+  {
+    ret = false;
+
+  } // yrt
+  return( ret );
 }
 
 // -------------------------------------------------------------------------
 bool cpPlugins::Interface::Interface::
 Unload( const std::string& name )
 {
-  if( this->m_Pluma.unload( name ) )
+  bool ret = true;
+  try
   {
-    this->m_Providers.clear( );
-    this->m_Classes.clear( );
-    this->_LoadClasses( );
-    return( true );
+    ret = this->m_Pluma.unload( name );
+    if( ret )
+    {
+      this->m_Providers.clear( );
+      this->m_Classes.clear( );
+      this->_LoadClasses( );
+
+    } // fi
   }
-  else
-    return( false );
+  catch( ... )
+  {
+    ret = false;
+
+  } // yrt
+  return( ret );
 }
 
 // -------------------------------------------------------------------------
 void cpPlugins::Interface::Interface::
 UnloadAll( )
 {
-  this->m_Pluma.unloadAll( );
+  try
+  {
+    this->m_Pluma.unloadAll( );
+  }
+  catch( ... )
+  {
+    // Do nothing
+
+  } // yrt
   this->m_Providers.clear( );
   this->m_Classes.clear( );
 }