projects
/
zf2.biz
/
galerie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Show exception's message on error page
[zf2.biz/galerie.git]
/
module
/
Application
/
views
/
error
/
index.phtml
diff --git
a/module/Application/views/error/index.phtml
b/module/Application/views/error/index.phtml
index
454b615
..
e62262f
100644
(file)
--- a/
module/Application/views/error/index.phtml
+++ b/
module/Application/views/error/index.phtml
@@
-1,14
+1,22
@@
<h1>An error occurred</h1>
<h2><?php echo $this->message ?></h2>
<h1>An error occurred</h1>
<h2><?php echo $this->message ?></h2>
-<?php if (isset($this->exception)): ?>
+<?php if (isset($this->display_exceptions) && $this->display_exceptions): ?>
+
+<?php if(isset($this->exception) && $this->exception instanceof Exception): ?>
<h3>Exception information:</h3>
<p>
<h3>Exception information:</h3>
<p>
- <b>Message:</b> <?php echo $this->exception->getMessage() ?>
+ <h4>Message:</h4>
+ <pre><?php echo $this->exception->getMessage() ?></pre>
+ <h4>Stack trace:</h4>
+ <pre><?php echo $this->exception->getTraceAsString() ?></pre>
</p>
</p>
-<h3>Stack trace:</h3>
-<pre><?php echo $this->exception->getTraceAsString() ?></pre>
+<?php else: ?>
+
+<h3>No Exception available</h3>
<?php endif ?>
<?php endif ?>
+
+<?php endif ?>
\ No newline at end of file