public void printStackTrace(PrintStream out) {
        synchronized (out) {
            PrintWriter pw = new PrintWriter(out, false);
            printStackTrace(pw);
            // Flush the PrintWriter before it's GC'ed.
            pw.flush();
        }
    }
Prints the stack trace of this exception to the specified stream.

@param out the <code>PrintStream</code> to use for output
jphp-runtime/src/php/runtime/common/collections/FunctorException.java