Fix crash issue due to no exception handler 54/262254/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 5 Aug 2021 07:22:10 +0000 (16:22 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 5 Aug 2021 08:08:01 +0000 (17:08 +0900)
Change-Id: I65dd70b09c7db7b0073998f81b5b1aaf4f49f3d1
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ISEDefaultNUI/SCLNUI.cs

index 02367b6..e902d1f 100644 (file)
@@ -483,11 +483,26 @@ namespace ISEDefaultNUI
                 }
             };
 
-            Preference.EventContext context = null;
-            Preference.GetEventContext(ResourceManager.IseConfigPreviewOn).TryGetTarget(out context);
-            if (context != null)
-            {
-                context.Changed += PreviewModeChanged;
+            try\r
+            {\r
+                Preference.EventContext context = null;
+                Preference.GetEventContext(ResourceManager.IseConfigPreviewOn).TryGetTarget(out context);
+                if (context != null)
+                {
+                    context.Changed += PreviewModeChanged;
+                }
+            }
+            catch (ArgumentException e)\r
+            {\r
+                Log.Error("NUIIME", "<<<< argument exception >>>>");\r
+            }
+            catch (InvalidOperationException e)
+            {\r
+                Log.Error("NUIIME", "<<<< Invalid operation >>>>");\r
+            }
+            catch (KeyNotFoundException e)
+            {\r
+                Log.Error("NUIIME", "<<<< key not found exception >>>>");\r
             }
 
             _updateWindowPositionChangedEvent = (int type, int x, int y, int rotationX, int rotationY, IntPtr user_data) =>