[NUI] Theme constructor throws XamlParseException
authorJiyun Yang <ji.yang@samsung.com>
Tue, 1 Jun 2021 07:44:06 +0000 (16:44 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 8 Jun 2021 05:35:32 +0000 (14:35 +0900)
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/public/Theme/Theme.cs

index 3ec78e5..2acfe74 100755 (executable)
@@ -60,7 +60,7 @@ namespace Tizen.NUI
         /// <param name="xamlFile">An absolute path to the xaml file.</param>
         /// <exception cref="ArgumentNullException">Thrown when the given xamlFile is null or empty string.</exception>
         /// <exception cref="global::System.IO.IOException">Thrown when there are file IO problems.</exception>
-        /// <exception cref="Exception">Thrown when the content of the xaml file is not valid xaml form.</exception>
+        /// <exception cref="XamlParseException">Thrown when the content of the xaml file is not valid xaml form.</exception>
         /// <since_tizen> 9 </since_tizen>
         public Theme(string xamlFile) : this()
         {
@@ -78,16 +78,21 @@ namespace Tizen.NUI
             }
             catch (System.IO.IOException)
             {
-                Tizen.Log.Error("NUI", $"Could not load \"{xamlFile}\".\n");
+                Tizen.Log.Info("NUI", $"Could not load \"{xamlFile}\".\n");
                 throw;
             }
-            catch (Exception)
+            catch (XamlParseException)
             {
-                Tizen.Log.Error("NUI", $"Could not parse \"{xamlFile}\".\n");
-                Tizen.Log.Error("NUI", "Make sure the all used assemblies (e.g. Tizen.NUI.Components) are included in the application project.\n");
-                Tizen.Log.Error("NUI", "Make sure the type and namespace are correct.\n");
+                Tizen.Log.Info("NUI", $"Could not parse \"{xamlFile}\".\n");
+                Tizen.Log.Info("NUI", "Make sure the all used assemblies (e.g. Tizen.NUI.Components) are included in the application project.\n");
+                Tizen.Log.Info("NUI", "Make sure the type and namespace are correct.\n");
                 throw;
             }
+            catch (Exception e)
+            {
+                Tizen.Log.Info("NUI", $"Could not parse \"{xamlFile}\".\n");
+                throw new XamlParseException(e.Message);
+            }
         }
 
         /// <summary>