Handling icu warning errors and unknown errors 67/209167/1 accepted/tizen/unified/20190704.040512 submit/tizen/20190703.075304
authorHyunjee Kim <hj0426.kim@samsung.com>
Wed, 3 Jul 2019 05:54:06 +0000 (14:54 +0900)
committerHyunjee Kim <hj0426.kim@samsung.com>
Wed, 3 Jul 2019 05:55:10 +0000 (14:55 +0900)
Change-Id: Ie8d54ff7b3efa2232b1ba3b1f68e423464f11072
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
src/utils_i18n_private.cpp

index 6091995..a6ad83b 100644 (file)
@@ -121,5 +121,11 @@ int _i18n_error_mapping(int err) {
                err_map.insert(make_pair(U_BRK_MALFORMED_RULE_TAG, I18N_ERROR_UBRK_MALFORMED_RULE_TAG));
        }
 
+       if(err <= U_ZERO_ERROR)
+               return I18N_ERROR_NONE;
+
+       if(err_map.find(err) == err_map.end())
+               return I18N_ERROR_UNKNOWN;
+
        return err_map.find(err)->second;
 }