Add error logs 92/287292/4
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 26 Jan 2023 02:46:29 +0000 (11:46 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 26 Jan 2023 09:31:59 +0000 (18:31 +0900)
Change-Id: Id6d2a69239b1667a450ca6b86e7bdb888b7f5de3
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
client/autofill.c
client/autofill_fill_request.c
common/autofill_view_info.c

index c3254d6..fac30bd 100644 (file)
@@ -316,8 +316,12 @@ EXPORT_API int autofill_create(autofill_h *ah)
 
 EXPORT_API int autofill_destroy(autofill_h ah)
 {
-    if (!ah)
+    LOGI("");
+
+    if (!ah) {
+        LOGW("[ERROR] Invalid parameter");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
+    }
 
     ah->connection_callback = NULL;
     ah->autofill_fill_response_received_cb = NULL;
@@ -331,6 +335,8 @@ EXPORT_API int autofill_destroy(autofill_h ah)
 
     free(ah);
 
+    LOGI("return error none");
+
     return AUTOFILL_ERROR_NONE;
 }
 
index 40ff834..0b5f179 100644 (file)
@@ -133,6 +133,7 @@ EXPORT_API int autofill_cancel_fill_request(autofill_h ah, autofill_view_info_h
     }
 
     if (!ah->rpc_h) {
+        LOGW("[ERROR] Operation failed");
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
 
@@ -190,8 +191,10 @@ EXPORT_API int autofill_cancel_fill_request(autofill_h ah, autofill_view_info_h
         LOGW("[ERROR] Failed to cancel fill request. rpc err = %d", ret);
         return AUTOFILL_ERROR_OPERATION_FAILED;
     }
-    else
+    else {
+        LOGI("return error none");
         return AUTOFILL_ERROR_NONE;
+    }
 }
 
 EXPORT_API int autofill_fill_response_set_received_cb(autofill_h ah, autofill_fill_response_received_cb callback, void *user_data)
index 9d773df..9fc3b62 100644 (file)
 
 EXPORT_API int autofill_view_info_create(autofill_view_info_h *vi)
 {
-    if (!vi)
+    if (!vi) {
+        LOGW("[ERROR] Invalid parameter");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
+    }
 
     struct autofill_view_info_s *vs = (struct autofill_view_info_s *)calloc(1, sizeof(struct autofill_view_info_s));
-    if (!vs)
+    if (!vs) {
+        LOGW("[ERROR] Out of memory");
         return AUTOFILL_ERROR_OUT_OF_MEMORY;
+    }
 
     *vi = (autofill_view_info_h)vs;
 
@@ -44,8 +48,11 @@ EXPORT_API int autofill_view_info_create(autofill_view_info_h *vi)
 
 EXPORT_API int autofill_view_info_destroy(autofill_view_info_h vi)
 {
-    if (!vi)
+    LOGI("autofill_view_info_destroy");
+    if (!vi) {
+        LOGW("[ERROR] Invalid parameter");
         return AUTOFILL_ERROR_INVALID_PARAMETER;
+    }
 
     if (vi->app_id) {
         free(vi->app_id);
@@ -64,6 +71,8 @@ EXPORT_API int autofill_view_info_destroy(autofill_view_info_h vi)
 
     free(vi);
 
+    LOGI("return error none");
+
     return AUTOFILL_ERROR_NONE;
 }