(BaseObject) If type-name is not found then show a warning instead of an error 72/24072/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 10 Jun 2014 14:07:59 +0000 (15:07 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 8 Jul 2014 13:14:56 +0000 (14:14 +0100)
[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 <adeel.kazmi@samsung.com>
capi/dali/public-api/object/base-handle.h
dali/public-api/object/base-object.cpp

index d79cff5..f80df08 100644 (file)
@@ -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;
 
index 6398436..3baa7fe 100644 (file)
@@ -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 )