harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r501855 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
Date Wed, 31 Jan 2007 14:43:42 GMT
Author: gshimansky
Date: Wed Jan 31 06:43:42 2007
New Revision: 501855

URL: http://svn.apache.org/viewvc?view=rev&rev=501855
Log:
Improved diagnostics on VM bootstrap. If classlib bootstrap fails, exception
stack trace should be printed


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp?view=diff&rev=501855&r1=501854&r2=501855
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp Wed Jan 31 06:43:42 2007
@@ -513,7 +513,14 @@
 
     thread_class = vm_env->java_lang_Thread_Class;
     class_initialize(thread_class);
-    if (exn_raised()) return TM_ERROR_INTERNAL;
+    if (exn_raised())
+    {
+        TRACE("Failed to initialize class for java/lang/Thread class = " << exn_get_name());
+        hythread_suspend_enable();
+        exn_print_stack_trace(stderr, exn_get());
+        hythread_suspend_disable();
+        return JNI_ERR;
+    }
 
     // Allocate new j.l.Thread object.
     thread_handle = oh_allocate_global_handle();
@@ -553,6 +560,9 @@
     vm_execute_java_method_array((jmethodID) constructor, 0, args);
     if (exn_raised()) {
         TRACE("Failed to initialize new thread object, exception = " << exn_get_name());
+        hythread_suspend_enable();
+        exn_print_stack_trace(stderr, exn_get());
+        hythread_suspend_disable();
         return JNI_ERR;
     }
     return JNI_OK;



Mime
View raw message