$this->writeln($this->red(_("Fatal Error:")));
$this->writeln($this->red($error));
$this->writeln();
- $this->writeln($backtrace->getMap());
+ $this->writeln((string)$backtrace);
$this->writeln($this->red('===================='));
exit(1);
}
$trace = debug_backtrace();
}
$backtrace = new Horde_Support_Backtrace($trace);
- $errortext .= '<div id="backtrace"><pre>' . $backtrace->getMap() . '</pre></div>';
+ $errortext .= '<div id="backtrace"><pre>' . (string)$backtrace . '</pre></div>';
if (is_object($error)) {
$errortext .= '<h3>' . _("Details") . '</h3>';
$errortext .= '<h4>' . _("The full error message is logged in Horde's log file, and is shown below only to administrators. Non-administrative users will not see error details.") . '</h4>';
*
* @return string The backtrace map.
*/
- public function getMap()
+ public function __toString()
{
$count = count($this->_backtrace);
$pad = strlen($count);
$this->assertEquals(count($dbt), $backtrace->getNestingLevel());
}
- public function testGetMap()
+ public function testToString()
{
$backtrace = new Horde_Support_Backtrace(array_slice($this->instanceMethod(), 0, 4));
$file = __FILE__;
- $this->assertEquals("1. Horde_Support_BacktraceTest->testGetMap()
+ $this->assertEquals("1. Horde_Support_BacktraceTest->testToString()
2. Horde_Support_BacktraceTest->instanceMethod() $file:89
3. Horde_Support_BacktraceTest::staticMethod() $file:29
4. backtraceTestFunction() $file:34
",
- $backtrace->getMap());
+ (string)$backtrace);
}
public function returnBacktrace()