public static void printStackTrace(PrintStream out, int frame, String title, String msg, Throwable excp)
{
if (out == null) { out = printStackTrace_Stream; }
if ((out != null) && (out != System.out) && (out != System.err)) {
Print.print("\n");
if (excp != null) {
String m = ((msg != null) && !msg.equals(""))? (msg + " - ") : "";
Print.println(null, frame + 1, "Error: " + m + excp + "");
StackTraceElement ste[] = excp.getStackTrace();
if (ste.length > 0) {
Print.print(" ==> at " + getStackFrameString(ste[0]) + "\n");
}
} else {
Print.println(null, frame + 1, msg);
}
if (printStackTrace_LogFile != null) {
Print.print("(Stack trace logged to '" + printStackTrace_LogFile + "')\n");
}
Print.print("\n");
}
_printStackTrace(out, frame + 1, title, msg, excp);
}