Changeset 11099 for code/trunk/src/libraries/core/GUIManager.cc
- Timestamp:
- Jan 27, 2016, 6:50:51 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/GUIManager.cc
r11083 r11099 793 793 } 794 794 795 /** Executes a CEGUI function normally, but catches CEGUI::ScriptException. 795 /** 796 @copydoc protectedCeguiSystemCall 797 @param function 798 Any callable object/function that takes one parameter. 799 @param object 800 Object to be used as an argument for the @p function 801 @return 802 True if input was handled, false otherwise. A caught exception yields true. 803 */ 804 template <typename FunctionType, typename ObjectType> 805 bool GUIManager::protectedCall(FunctionType function, ObjectType object) 806 { 807 try 808 { 809 return function(object); 810 } 811 catch (CEGUI::ScriptException& ex) 812 { 813 // Display the error and proceed. See @remarks why this can be dangerous. 814 orxout(internal_error) << ex.getMessage() << endl; 815 return true; 816 } 817 } 818 819 /** 820 Executes a CEGUI function normally, but catches CEGUI::ScriptException. 796 821 When a ScriptException occurs, the error message will be displayed and 797 822 the program carries on. … … 808 833 True if input was handled, false otherwise. A caught exception yields true. 809 834 */ 810 template <typename FunctionType, typename ObjectType>811 bool GUIManager::protectedCall(FunctionType function, ObjectType object)812 {813 try814 {815 return function(object);816 }817 catch (CEGUI::ScriptException& ex)818 {819 // Display the error and proceed. See @remarks why this can be dangerous.820 orxout(internal_error) << ex.getMessage() << endl;821 return true;822 }823 }824 825 835 template <typename FunctionType> 826 836 bool GUIManager::protectedCeguiSystemCall(FunctionType function)
Note: See TracChangeset
for help on using the changeset viewer.