]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/button.cxx
creaButtonContainer: new structure to make easy the button settings
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / button.cxx
index 8f65b0310315dc882548ffe7cd5f6aaa5a03cc3b..d45f9c21fac05bad7b4a6b44107c3169c31ddb7f 100644 (file)
@@ -2,7 +2,7 @@
  * @file button.cxx
  * @brief Implements the Button class implementation.
  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
- * @date  2011-05-19
+ * @date  2011-05-24
  */
 
 #include "button.h"
@@ -54,11 +54,18 @@ namespace creaButtonContainer
                void
                Button::Execute( )
                {
-                       std::cout << "ButtonAction: " << this->m_ButtonPair->first->first
-                           << std::endl;
-                       TFunctor* vTable[ ] =
-                       { this->m_ButtonPair->second->second };
-                       vTable[ 0 ]->Call( this->m_ButtonPair->first->first );
+                       try
+                       {
+                               std::cout << "ButtonAction: " << this->m_ButtonPair->first->first
+                                   << std::endl;
+                               TFunctor* vTable[ ] =
+                               { this->m_ButtonPair->second->second };
+                               vTable[ 0 ]->Call( this->m_ButtonPair->first->first );
+                       }//yrt
+                       catch ( std::exception& e )
+                       {
+                               std::cerr << "Button::Execute( ) exception: " << e.what( ) << std::endl;
+                       }//hctac
                }
        // ----------------------------------------------------------------------------------
        }//ecapseman