forked from AKSW/xodx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error reporting. Fix AKSW#29.
- Loading branch information
1 parent
3329898
commit 0adb25f
Showing
3 changed files
with
112 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
<h2>Error</h2> | ||
<div class="error"> | ||
<?php if (isset($this->errorType)) : ?> | ||
<h2><?= $this->errorType ?></h2> | ||
<?php else : ?> | ||
<h2>Error</h2> | ||
<?php endif; ?> | ||
<div class="alert alert-error"> | ||
<?php if (is_a($this->exception, 'Exception')): ?> | ||
<strong><?= $this->exception->getMessage() ?></strong> in <?= basename($this->exception->getFile()) . '@l.' . $this->exception->getLine() ?> | ||
<ol> | ||
<?php foreach($this->exception->getTrace() as $item): ?> | ||
<li><?=basename($item['file']) . '@l.' . $item['line'] ?></li> | ||
<?php endforeach; ?> | ||
</ol> | ||
<?php else: ?> | ||
<?= $this->exception ?> | ||
<?php endif; ?> | ||
</div> | ||
<p>If you think reporting this error can help improving this software, please <a href="https://github.com/white-gecko/xodx/issues">create a new issue on our GitHub page</a>.</p> | ||
<?php if (isset($this->back)) : ?> | ||
<a class="btn" href="<?= $this->back ?>"><i class="icon-hand-left"></i> Back to Start</a> | ||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link type="text/css" href="resources/bootstrap/css/bootstrap.min.css" rel="stylesheet" /> | ||
<link type="text/css" href="resources/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" /> | ||
<link type="text/css" href="resources/css/all.css" rel="stylesheet" /> | ||
<style type="text/css"> | ||
@media (min-width: 980px) { | ||
body { | ||
padding-top: 60px; | ||
} | ||
} | ||
.sidebar-nav { | ||
padding: 9px 0; | ||
} | ||
</style> | ||
<script type="text/javascript" src="resources/jquery/jquery.js"></script> | ||
<script type="text/javascript" src="resources/bootstrap/js/bootstrap.js"></script> | ||
</head> | ||
<body> | ||
<div class="navbar navbar-fixed-top navbar-inverse"> | ||
<div class="navbar-inner"> | ||
<div class="container"> | ||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</a> | ||
<a class="brand"><img src="resources/img/xodx_20.png" alt="Xodx" title="[ˈɛksodʊs]" /></a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<?php | ||
foreach ($this->_contentFiles as $contentFile) { | ||
include $contentFile; | ||
} | ||
?> | ||
</div> | ||
|
||
<?php if ($this->_debug && !empty($this->_debugLog)) : ?> | ||
|
||
<div class="debug" id="debugConsole"> | ||
<h3>Debuglog:</h3> | ||
<pre> | ||
<?= $this->_debugLog ?> | ||
</pre> | ||
</div> | ||
|
||
<?php endif; ?> | ||
</body> | ||
</html> |