From c117a35d5edd3bbb91451549cb9937f399a5cc97 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Tue, 10 Jun 2014 15:07:59 +0100 Subject: [PATCH] (BaseObject) If type-name is not found then show a warning instead of an error [problem] Too many error messages when launching apps that do not use the type-registry (not an bug, apps can choose not to use it). [solution] Change to warning. Change-Id: I9900fcf987aa7b02a904d1f304e43f0fe7e556c5 Signed-off-by: Adeel Kazmi --- capi/dali/public-api/object/base-handle.h | 5 ++++- dali/public-api/object/base-object.cpp | 7 +++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/capi/dali/public-api/object/base-handle.h b/capi/dali/public-api/object/base-handle.h index d79cff5..f80df08 100644 --- a/capi/dali/public-api/object/base-handle.h +++ b/capi/dali/public-api/object/base-handle.h @@ -147,7 +147,10 @@ public: /** * @brief Returns the type name for the Handle. * - * @return The type name. + * Will return an empty string if the typename does not exist. This will happen for types that + * have not registered with type-registry. + * + * @return The type name. Empty string if the typename does not exist. */ const std::string& GetTypeName() const; diff --git a/dali/public-api/object/base-object.cpp b/dali/public-api/object/base-object.cpp index 6398436..3baa7fe 100644 --- a/dali/public-api/object/base-object.cpp +++ b/dali/public-api/object/base-object.cpp @@ -80,10 +80,9 @@ const std::string& BaseObject::GetTypeName() const } } - // We should not reach here - static const std::string INVALID_NAME; - DALI_LOG_ERROR( "TypeName Not Found\n" ); - return INVALID_NAME; + // Return an empty string if type-name not found. + DALI_LOG_WARNING( "TypeName Not Found\n" ); + return String::EMPTY; } bool BaseObject::DoConnectSignal( ConnectionTrackerInterface* connectionTracker, const std::string& signalName, FunctorDelegate* functor ) -- 2.7.4