[NUI] Do not make error message when the profile theme file is not found (#2188)
authorJiyun Yang <ji.yang@samsung.com>
Fri, 6 Nov 2020 09:44:03 +0000 (18:44 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 12 Nov 2020 08:41:22 +0000 (17:41 +0900)
In some profile, not all 3 theme files exists.
So the patch checks file existance not to make error messages.

Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/public/Theme/ThemeManager.cs

index 1192cb1..239b57b 100644 (file)
@@ -19,6 +19,7 @@ using TizenSystemInformation.Tizen.System;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.IO;
 using Tizen.NUI.Xaml;
 using Tizen.NUI.BaseComponents;
 
@@ -305,6 +306,12 @@ namespace Tizen.NUI
             {
                 string path = StyleManager.FrameworkResourcePath + "/Theme/" + project + "_" + id + ".xaml";
 
+                if (!File.Exists(path))
+                {
+                    Tizen.Log.Info("NUI", $"\"{path}\" is not found in this profile.\n");
+                    continue;
+                }
+
                 try
                 {
                     loaded.Merge(path);