From af5f2e222e49c02f0edfe50c4359bf65344ec69c Mon Sep 17 00:00:00 2001 From: Kimmo Hoikka Date: Tue, 4 Dec 2018 17:41:39 +0000 Subject: [PATCH] Removed unnecessary try-catch from Control base class - GetPropertyName used to ASSERT_ALWAYS but now just does a LOG_ERROR Change-Id: I72a216000e233ec4d83b90019d3bc2ac777d7497 --- .../internal/controls/control/control-data-impl.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/dali-toolkit/internal/controls/control/control-data-impl.cpp b/dali-toolkit/internal/controls/control/control-data-impl.cpp index a8387ee..5e94e8f 100755 --- a/dali-toolkit/internal/controls/control/control-data-impl.cpp +++ b/dali-toolkit/internal/controls/control/control-data-impl.cpp @@ -477,19 +477,13 @@ void Control::Impl::RegisterVisual( Property::Index index, Toolkit::Visual::Base // ( If the control has been type registered ) if( visual.GetName().empty() ) { - try + // returns empty string if index is not found as long as index is not -1 + std::string visualName = self.GetPropertyName( index ); + if( !visualName.empty() ) { - std::string visualName = self.GetPropertyName( index ); - if( !visualName.empty() ) - { - DALI_LOG_INFO( gLogFilter, Debug::Concise, "Setting visual name for property %d to %s\n", - index, visualName.c_str() ); - visual.SetName( visualName ); - } - } - catch( Dali::DaliException e ) - { - DALI_LOG_WARNING( "Attempting to register visual without a registered property, index: %d\n", index ); + DALI_LOG_INFO( gLogFilter, Debug::Concise, "Setting visual name for property %d to %s\n", + index, visualName.c_str() ); + visual.SetName( visualName ); } } -- 2.7.4