Print the stack trace to a print writer.
</p>
If this exception was thrown from a remote process,
the stack trace will include the stack from the
remote process.

@param param java.io.PrintWriter
334248
public void printStackTrace(java.io.PrintWriter pw) {
        String lineSep = getLineSeparatorProperty();

        printText(pw, "currentException", "Current exception:");
        printStackTrace(lineSep, pw);
        printText(pw, "endOfExTraces", "End of exception traces");
    }
658757
public void print(java.io.PrintWriter printWriter)
    {
        synchronized (flushHelper) {
            synchronized (notifyHelper) {
                synchronized (logBufferLock) {
                    printWriter.println("State Dump for:" + cclass.getName()
                                        + " logFile=" + logFile + "(java.io.RandomaccessFile)"
                                        + " fileLogHeader=" + fileLogHeader + "(FileLogHeader)"
                                        + "\n filePosition=" + filePosition + "(long)"
                                        + " filePositionSectorByte=" + filePositionSectorByte + "(byte)"
                                        + " bufferFilePosition=" + bufferFilePosition + "(long)"
                                        + " bufferSectorByte=" + bufferSectorByte + "(byte)"
                                        + " fileSpaceLeft=" + fileSpaceLeft + "(long)"
                                    );
                    printWriter.println(" firstPageToFlush=" + firstPageToFlush + "(int)"
                                        + " lastPageNotified=" + lastPageNotified + "(int)"
                                        + " nextPageToNotify=" + nextPageToNotify + "(int)"
                                        + " firstPageFilling=" + firstPageFilling + "(int)"
                                        + " lastPageFilling=" + lastPageFilling + "(int)"
                                        + "\n nextFreeByteInLogBuffer=" + nextFreeByteInLogBuffer + "(int)"
                                        + " newLogBufferPages=" + newLogBufferPages + "(int)"
                                    );
                    printWriter.println();

                    logBuffer.print(printWriter);
                } // synchronized (logBufferLock).
            } // synchronized (notifyHelper).
        } // synchronized (flushHelper).
    }
740860
@Override
    public void error(String msg, Throwable error) {
        try {
            if ((verbose || stacktrace) && error != null) {
                printStackTrace(msg, error);
                error(ERROR, msg);
            } else {
                error(ERROR, msg + STACKTRACE_MESSAGE);
            }
        } finally {
            postPrintMessage();
        }
    }
1131681
public static void printStackTrace(Throwable e, PrintWriter out)
  {
    StackTraceElement lastHead = null;

    ClassLoader loader = SimpleLoader.create(WorkDir.getLocalWorkDir());
    
    while (true) {
      if (e.getMessage() != null)
        out.println(e.getClass().getName() + ": " + e.getMessage());
      else
        out.println(e.getClass().getName());

      StackTraceElement []trace = e.getStackTrace();
      StackTraceElement nextHead = trace.length > 0 ? trace[0] : null;

      for (int i = 0; i < trace.length; i++) {
        if (trace[i].equals(lastHead))
          break;

        out.print("\tat ");

        printStackTraceElement(trace[i], out, loader);
      }

      lastHead = nextHead;

      Throwable cause = e.getCause();

      if (cause != null) {
        out.print("Caused by: ");
        e = cause;
      }
      else
        break;
    }
  }
273416
public void println(String s) throws IOException
    {
        if(this._listener!= null &&  !checkIfCalledFromWLonError()){
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())    
                Tr.debug(tc, "non blocking println String , WriteListener enabled: " + this._listener);
            if(s!=null){
                this.println_NonBlocking(s);
            }            
        }
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())    
                Tr.debug(tc, "println String");
            super.println(s);
        }
    }
419121
@Override
    public void printStack(final StringBuilder sb, final StackTraceElement[] trace) {
        for (final StackTraceElement element : trace) {
            sb.append("\tat ").append(element).append('\n');
        }
    }
500580
public void printStackTrace() {
        if (detail == null) {
            super.printStackTrace();
        } else {
            synchronized(System.err) {
                System.err.println(super.getMessage() + "; nested exception is:");
                detail.printStackTrace();
            }
        }
    }
912564
public void printStackTrace(PrintStream s) {
        if (!isJDK14OrAbove && causeOnJDK13OrBelow != null) {
            printStackTrace0(new PrintWriter(s));
        }
        else {
            super.printStackTrace(s);
        }
    }
283944
public static String printStackTrace(Throwable t) {
        return t == null ? PcConstants.NA : ExceptionUtils.getStackTrace(t);

    }
657510
public void println(String s) throws IOException
    {
        if(this._listener!= null &&  !checkIfCalledFromWLonError()){
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())    
                Tr.debug(tc, "non blocking println String , WriteListener enabled: " + this._listener);
            if(s!=null){
                _outHelper.println_NonBlocking(s);
            }            
        }
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())    
                Tr.debug(tc, "println String");
            synchronized(this) {
                if(s!=null) {
                    this.write(s.getBytes(), 0, s.length());
                }
                this.write(CRLF, 0, 2);
            }
        }
    }
976719
public void printError() {
    System.out.print(description);
    if (value != null)
      System.out.print(" (" + value + ")");
    System.out.println();
  }
15011
public void printStackTrace(PrintStream printStream) {
    if (mStackTrace == null) {
      printStream.print(getMessage());
    }
    else {
      printStream.print(mStackTrace);
    }
  }
48108
public static void printStackTraces(PrintWriter writer, List<String> currentStacktrace) {
        if (currentStacktrace == null) {
            currentStacktrace = new ArrayList<>();
        }

        Map<Thread, StackTraceElement[]> traces = Thread.getAllStackTraces();
        StackTraceElement[] myTrace = traces.get(Thread.currentThread());
        for (StackTraceElement ste : myTrace) {
            currentStacktrace.add(ste.toString());
        }

        writer.println();
        writer.println("****** Current Thread ****** ");
        for (String currentStackElem : currentStacktrace) {
            writer.println(currentStackElem);
        }

        writer.println("****** All Threads ******");
        Iterator<Thread> it = traces.keySet().iterator();
        while (it.hasNext())
        {
            Thread key = it.next();
            writer.println();
            StackTraceElement[] st = traces.get(key);
            writer.println("****** " + key + " ******");
            for (StackTraceElement ste : st) {
                writer.println(ste);
            }
        }
    }
530754
public void printStackTrace(java.io.PrintWriter s)
  {

    if (s == null)
      s = new java.io.PrintWriter(System.err);
        
    try
    {
      super.printStackTrace(s);
    }
    catch (Exception e){}
    
    
    boolean isJdk14OrHigher = false;
    try {
        Throwable.class.getMethod("getCause", (Class<?>) null);
        isJdk14OrHigher = true;
    } catch (NoSuchMethodException nsme) {
        // do nothing
    }
        
    // The printStackTrace method of the Throwable class in jdk 1.4 
    // and higher will include the cause when printing the backtrace.
    // The following code is only required when using jdk 1.3 or lower               
    if (!isJdk14OrHigher) {
    	        
      Throwable exception = m_exception;

      for (int i = 0; (i < 10) && (null != exception); i++)
      {
        s.println("---------");

        try
        {
          exception.printStackTrace(s);
        }
        catch (Exception e)
        {
          s.println("Could not print stack trace...");
        }

        if (exception instanceof TransformerException)
        {
          TransformerException se = (TransformerException) exception;
          Throwable prev = exception;

          exception = se.getException();

          if (prev == exception)
          {
            exception = null;

            break;
          }
        }
        else
        {
          exception = null;
        }
      }
    }
  }
1009249
public static void println(Object caller, String format, Object... args)
	{
		Object msg = String.format(format, args);
		
		println(caller,msg);
	}
320033
public void printStackTrace(java.io.PrintStream s) {
        printStackTrace(new java.io.PrintWriter(s));
    }
1176795
public void print(java.io.PrintWriter printWriter)
    {
        printWriter.println("State Dump for:" + getClass().getName()
                            + " state=" + state + "(int) " + stateNames[state] + "(String)"
                            + " transactionLock=" + transactionLock + "(TransactionLock)"
                        );
        if (logicalUnitOfWork == null)
            printWriter.println("logicalUnitOfWork=null");
        else {
            printWriter.print("logialUnitOfWork.identifier=" + logicalUnitOfWork.identifier + "(long)");
            if (logicalUnitOfWork.XID != null) {
                printWriter.print(" XID=");
                for (int i = 0; i < logicalUnitOfWork.XID.length; i++) {
                    printWriter.print(Integer.toHexString(logicalUnitOfWork.XID[i]));
                }
            }
            printWriter.println();
        }

        printWriter.println("logSpaceReserved=" + logSpaceReserved + "(long)"
                            + " requiresPersistentCheckpoint=" + requiresPersistentCheckpoint + "(boolean)"
                            + " transactionReference=" + transactionReference + "(TransactionReference)"
                        );

        printWriter.println("Included Objects...");
        for (java.util.Iterator managedObjectIterator = includedManagedObjects.values().iterator(); managedObjectIterator.hasNext();) {
            ManagedObject managedObject = (ManagedObject) managedObjectIterator.next();
            Token token = managedObject.getToken();
            printWriter.print(managedObject.toString());

            Long logSequenceNumber = (Long) logSequenceNumbers.get(token);
            Long managedObjectSequenceNumber = (Long) managedObjectSequenceNumbers.get(token);
            printWriter.print(" LSN=" + logSequenceNumber + " MSN=" + managedObjectSequenceNumber);

            ObjectManagerByteArrayOutputStream serializedBytes = (ObjectManagerByteArrayOutputStream) loggedSerializedBytes.get(token);
            if (serializedBytes == null)
                printWriter.print(" serializedBytes=null");
            else
                printWriter.print(serializedBytes);

            if (callbackTokens.contains(token))
                printWriter.println(" Callback");
            else
                printWriter.println();
        } // for ... includedMansagedObjects.

    }