From: Adeel Kazmi Date: Tue, 10 Jun 2014 14:07:59 +0000 (+0100) Subject: (BaseObject) If type-name is not found then show a warning instead of an error X-Git-Tag: dali_1.0.0~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c117a35d5edd3bbb91451549cb9937f399a5cc97;p=platform%2Fcore%2Fuifw%2Fdali-core.git (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 --- 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 )