public function printStackTrace() { $out = new MemoryOutputStream(); $e = new Throwable('Test'); $e->printStackTrace(Streams::writeableFd($out)); $this->assertEquals($e->toString(), $out->getBytes()); }
/** * Called when compilation fails * * @param xp.compiler.io.Source src * @param lang.Throwable reason */ public function compilationFailed(Source $src, \lang\Throwable $reason) { $this->writer->writeLine($src, ': ', $reason->compoundMessage()); $reason->printStackTrace(); }