src/share/vm/utilities/exceptions.cpp

Print this page
rev 6853 : 8046070: Class Data Sharing clean up and refactoring
Summary: Cleaned up CDS to be more configurable, maintainable and extensible
Reviewed-by: dholmes, coleenp, acorn, mchung

@@ -83,13 +83,17 @@
            "need to increase min_stack_allowed calculation");
   }
 #endif // ASSERT
 
   if (thread->is_VM_thread()
-      || thread->is_Compiler_thread() ) {
+      || thread->is_Compiler_thread()
+      || DumpSharedSpaces ) {
     // We do not care what kind of exception we get for the vm-thread or a thread which
     // is compiling.  We just install a dummy exception object
+    //
+    // We also cannot throw a proper exception when dumping, because we cannot run
+    // Java bytecodes now. A dummy exception will suffice.
     thread->set_pending_exception(Universe::vm_exception(), file, line);
     return true;
   }
 
   return false;

@@ -106,13 +110,17 @@
     }
     ShouldNotReachHere();
   }
 
   if (thread->is_VM_thread()
-      || thread->is_Compiler_thread() ) {
+      || thread->is_Compiler_thread()
+      || DumpSharedSpaces ) {
     // We do not care what kind of exception we get for the vm-thread or a thread which
     // is compiling.  We just install a dummy exception object
+    //
+    // We also cannot throw a proper exception when dumping, because we cannot run
+    // Java bytecodes now. A dummy exception will suffice.
     thread->set_pending_exception(Universe::vm_exception(), file, line);
     return true;
   }
   return false;
 }