add printing errno 68/318168/1
authordyamy-lee <dyamy.lee@samsung.com>
Wed, 25 Sep 2024 07:52:52 +0000 (16:52 +0900)
committerdyamy-lee <dyamy.lee@samsung.com>
Wed, 25 Sep 2024 07:52:52 +0000 (16:52 +0900)
In tts_parser_get_personal_info(), it can show the result of errno

Change-Id: I1ab75f45a954475e9dbe125d93ffd0acb1bba124

common/tts_config_parser.c

index b01122519144c16619a51acaac0de7bf14f869a6..8bbeec8084fd410d56c675d824b5d243fa00973a 100644 (file)
@@ -260,11 +260,12 @@ int tts_parser_get_personal_info(const char* path, tts_personal_info_s** persona
 
        struct stat sb;
        if (stat(path, &sb) == -1) {
-               if (errno == ENOENT) {
+               int err = errno;
+               if (ENOENT == err) {
                        SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] There is no personal xml file");
-                       return ENOENT;
+                       return err;
                } else {
-                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] stat error");
+                       SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] stat error(%s)", strerror(err));
                        return -1;
                }
        }