Merge pull request #3106 from lambdageek/dev/monoerror-unhandled
authorAleksey Kliger (λgeek) <akliger@gmail.com>
Mon, 13 Jun 2016 15:52:35 +0000 (11:52 -0400)
committerGitHub <noreply@github.com>
Mon, 13 Jun 2016 15:52:35 +0000 (11:52 -0400)
[runtime] Okay to raise MonoError in thread start functions.

mono/metadata/coree.c
mono/metadata/threads.c
mono/mini/driver.c

index 8c18b9427809ec12e8a997946853620e4073054c..4436229376e10101b1d16f827601c72f466d2328 100644 (file)
@@ -199,7 +199,7 @@ __int32 STDMETHODCALLTYPE _CorExeMain(void)
        LocalFree (argvw);
 
        mono_runtime_run_main_checked (method, argc, argv, &error);
-       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       mono_error_raise_exception (&error); /* OK, triggers unhandled exn handler */
        mono_thread_manage ();
 
        mono_runtime_quit ();
index 4aa7c5d6435bc5e36a83a75ebd006f8190352856..0c518966310178a55d9b7f10023d296498134352 100644 (file)
@@ -744,7 +744,7 @@ static guint32 WINAPI start_wrapper_internal(void *data)
                args [0] = start_arg;
                /* we may want to handle the exception here. See comment below on unhandled exceptions */
                mono_runtime_delegate_invoke_checked (start_delegate, args, &error);
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
+               mono_error_raise_exception (&error); /* OK, triggers unhandled exn handler */
        }
 
        /* If the thread calls ExitThread at all, this remaining code
index 18639e9de084d3b9c0d1b8edd2b88618bb964b99..518834de3b4867000a5fd3ba6b0fb1fc668d8faf 100644 (file)
@@ -1038,7 +1038,7 @@ mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[
                return res;
        } else {
                int res = mono_runtime_run_main_checked (method, argc, argv, &error);
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
+               mono_error_raise_exception (&error); /* OK, triggers unhandled exn handler */
                return res;
        }
 }