Coverager: better error displaying
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@185 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
parent
30f90f5293
commit
4aa68f9317
|
@ -60,3 +60,4 @@ pre.code {
|
|||
}
|
||||
|
||||
.footnote { text-align: right; font-size: 12px; }
|
||||
.error { color: red; }
|
||||
|
|
|
@ -124,10 +124,12 @@ class XcacheCoverageViewer
|
|||
}
|
||||
}
|
||||
else if (!$this->datadir) {
|
||||
$action = 'require xcache.coveragedump_directory';
|
||||
$action = 'error';
|
||||
$error = 'require `ini:xcache.coveragedump_directory` or `config:$datadir` to be set';
|
||||
}
|
||||
else {
|
||||
$action = "no data";
|
||||
$action = 'error';
|
||||
$error = "no data";
|
||||
}
|
||||
|
||||
$xcache_version = defined('XCACHE_VERSION') ? XCACHE_VERSION : '';
|
||||
|
|
|
@ -225,7 +225,10 @@ EOS;
|
|||
}
|
||||
}
|
||||
else {
|
||||
echo htmlspecialchars($action);
|
||||
$error_html = htmlspecialchars($error);
|
||||
echo <<<EOS
|
||||
<span class="error">{$error_html}</span>
|
||||
EOS;
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue