if (out.isSystemErr()) { VM.sysWriteln("VM_StackTrace.print(): Ran out of memory while dumping a stack trace to \"System.err\".  We will try again now, using the low-level \"VM.sysWrite()\""); out = null; try { out = new PrintContainer.VMSysWriteln(); } catch (OutOfMemoryError e2) { VM.sysWriteln("VM_StackTrace.print(): Out of memory AGAIN; can't even make a PrintContainer.VMSysWriteln(); I give up."); return; } catch (Throwable t) { VM.sysWriteln("VM_StackTrace.print(): Random unexpected exception; bailing out."); return; } try { print4Real(out, trigger); } catch (Throwable t) { VM.sysWriteln("VM_StackTrace.print(): More trouble while printing a stack trace via VM.sysWrite(); I give up."); return; } } else { VM.sysWriteln("VM_StackTrace.print(): *UNEXPECTED* out-of-memory error while displaying the stack trace.  I give up; what you see is what you got.");  return; }
trigger.tallyOutOfMemoryError(); printDegradingToVMSysWrite(out, trigger);
  public void print(PrintLN out, Throwable trigger) {    try {      print4Real(out, trigger);    } catch (OutOfMemoryError e) {      //      if (out instanceof PrintContainer.VMSysWriteln)      if (out.isSystemErr()) {	VM.sysWriteln("VM_StackTrace.print(): Ran out of memory while dumping a stack trace to \"System.err\".  We will try again now, using the low-level \"VM.sysWrite()\"");	out = null;		// make the old "out" available to GC	try {	  out = new PrintContainer.VMSysWriteln();	} catch (OutOfMemoryError e2) {	  VM.sysWriteln("VM_StackTrace.print(): Out of memory AGAIN; can't even make a PrintContainer.VMSysWriteln(); I give up.");	  return;	} catch (Throwable t) {	  VM.sysWriteln("VM_StackTrace.print(): Random unexpected exception; bailing out.");	  return;	}	try {	  print4Real(out, trigger);	} catch (Throwable t) {	  VM.sysWriteln("VM_StackTrace.print(): More trouble while printing a stack trace via VM.sysWrite(); I give up.");	  return;	}      } else {	VM.sysWriteln("VM_StackTrace.print(): *UNEXPECTED* out-of-memory error while displaying the stack trace.  I give up; what you see is what you got.");	/* Now, if we were triggered by an uncaught exception, processing will	 * continue normally. */	return;      }    } catch (Throwable e) {      VM.sysWriteln("VM_StackTrace.print(): *UNEXPECTED* random exception while displaying the stack trace .  What I see is what I get.");      VM.sysWriteln(e.toString());      e.printStackTrace(new PrintContainer.VMSysWriteln());      // Again, proceed normally.      return;    }  }