Example #1
0
<?php

if ('500' != $sf_error_log->getType()) {
    return;
}
?>

<?php 
$e = new sfException();
$traces = $e->getTraces($sf_error_log->getExceptionObject(), 'html');
?>

<style>
  #main { font: 11px Verdana, Arial, sans-serif; color: #333 }
  ul { list-style: decimal }
  ul li { padding-bottom: 5px; margin: 0 }
  ol { font-family: monospace; white-space: pre; list-style-position: inside; margin: 0; padding: 10px 0 }
  ol li { margin: -5px; padding: 0 }
  ol .selected { font-weight: bold; background-color: #ddd; padding: 2px 0 }
</style>

<script type="text/javascript">
function toggle(id)
{
  el = document.getElementById(id); el.style.display = el.style.display == 'none' ? 'block' : 'none';
}
</script>

<ul id="main">
  <li><?php 
echo implode("</li>\n<li>", $traces);
<?php

$traces = sfException::getTraces($exception, 'plain');
?>
<h2 id="message"><?php 
echo str_replace("\n", '<br />', htmlspecialchars($exception->getMessage(), ENT_QUOTES, sfConfig::get('sf_charset', 'UTF-8')));
?>
</h2>
<?php 
if ($exception instanceof limeException) {
    $url = $exception->getUrl();
    ?>
Please visit <a href="<?php 
    echo $url;
    ?>
"><?php 
    echo $url;
    ?>
</a> for more information.
<?php 
} else {
    ?>
This exception does not appear to have an associated help page. Bummer.
<?php 
}
?>
 
<h2>stack trace</h2>
<ul><li><?php 
echo implode('</li><li>', $traces);
?>