Permalink
Browse files

Merge branch 'hotfix/recursive404' of https://github.com/rufinus/Zend…

…SkeletonApplication into hotfix/131
  • Loading branch information...
2 parents 32b1b75 + e272f29 commit b620dfad6db3f338c4bdaf4d46f4cf71f8b2d9d1 @weierophinney weierophinney committed Oct 3, 2012
Showing with 53 additions and 7 deletions.
  1. +53 −7 module/Application/view/error/404.phtml
@@ -46,16 +46,62 @@ if (isset($this->controller_class)
<?php endif ?>
-<?php if (isset($this->exception) && $this->exception): ?>
+<?php if (isset($this->display_exceptions) && $this->display_exceptions): ?>
-<h2><?php echo $this->translate('Exception') ?>:</h2>
+<?php if(isset($this->exception) && $this->exception instanceof Exception): ?>
+<hr/>
+<h2><?php echo $this->translate('Additional information') ?>:</h2>
+<h3><?php echo get_class($this->exception); ?></h3>
+<dl>
+ <dt><?php echo $this->translate('File') ?>:</dt>
+ <dd>
+ <pre class="prettyprint linenums"><?php echo $this->exception->getFile() ?>:<?php echo $this->exception->getLine() ?></pre>
+ </dd>
+ <dt><?php echo $this->translate('Message') ?>:</dt>
+ <dd>
+ <pre class="prettyprint linenums"><?php echo $this->exception->getMessage() ?></pre>
+ </dd>
+ <dt><?php echo $this->translate('Stack trace') ?>:</dt>
+ <dd>
+ <pre class="prettyprint linenums"><?php echo $this->exception->getTraceAsString() ?></pre>
+ </dd>
+</dl>
+<?php
+ $e = $this->exception->getPrevious();
+ if ($e) :
+?>
+<hr/>
+<h2><?php echo $this->translate('Previous exceptions') ?>:</h2>
+<ul class="unstyled">
+ <?php while($e) : ?>
+ <li>
+ <h3><?php echo get_class($e); ?></h3>
+ <dl>
+ <dt><?php echo $this->translate('File') ?>:</dt>
+ <dd>
+ <pre class="prettyprint linenums"><?php echo $e->getFile() ?>:<?php echo $e->getLine() ?></pre>
+ </dd>
+ <dt><?php echo $this->translate('Message') ?>:</dt>
+ <dd>
+ <pre class="prettyprint linenums"><?php echo $e->getMessage() ?></pre>
+ </dd>
+ <dt><?php echo $this->translate('Stack trace') ?>:</dt>
+ <dd>
+ <pre class="prettyprint linenums"><?php echo $e->getTraceAsString() ?></pre>
+ </dd>
+ </dl>
+ </li>
+ <?php
+ $e = $e->getPrevious();
+ endwhile;
+ ?>
+</ul>
+<?php endif; ?>
-<p><b><?php echo $this->escapeHtml($this->exception->getMessage()) ?></b></p>
+<?php else: ?>
-<h3><?php echo $this->translate('Stack trace') ?>:</h3>
+<h3><?php echo $this->translate('No Exception available') ?></h3>
-<pre>
-<?php echo $this->exception->getTraceAsString() ?>
-</pre>
+<?php endif ?>
<?php endif ?>

0 comments on commit b620dfa

Please sign in to comment.