Fix failed to launch on Exception. 52/104752/1
authorpius.lee <pius.lee@samsung.com>
Wed, 30 Nov 2016 07:29:20 +0000 (16:29 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Wed, 14 Dec 2016 08:07:47 +0000 (17:07 +0900)
Fix Failed to launch on exception happend when unhandled exception
handler failed to set.

Make catch a exception on failed but it goes to launching normally.

If unhandled exception handler is not set, unhandled exception is not
print out to dlog but print into journal log.

Change-Id: I3679470a2fa8d750cfbb1f47fc705dcf3a69e53b

Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyManager.cs

index 28b0edf..ea31f8f 100644 (file)
@@ -121,6 +121,15 @@ namespace Tizen.Runtime.Coreclr
                 var addMethod = unhandledException.GetAddMethod(true);
                 addMethod.Invoke(appdomain, new[] {handler});
 
+            }
+            catch (Exception e)
+            {
+                ALog.Debug("Exception on set handler for unhandled exception");
+                PrintException(e);
+            }
+
+            try
+            {
                 CurrentAssemblyLoaderContext = new AssemblyLoader();
 
                 if (!string.IsNullOrEmpty(preloadDirectory))